Skip to content

Commit

Permalink
change how we're calling IO#read to better conform to the Rack spec (…
Browse files Browse the repository at this point in the history
…and can thus be used to parse a rack.input stream)
  • Loading branch information
Brian Lopez authored and Brian Lopez committed Jan 26, 2010
1 parent b742b2d commit 05f1bb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/yajl_ext.c
Expand Up @@ -441,7 +441,7 @@ static VALUE rb_yajl_parser_parse(int argc, VALUE * argv, VALUE self) {
} else if (rb_respond_to(input, intern_eof)) {
VALUE parsed = rb_str_new2("");
while (rb_funcall(input, intern_eof, 0) != Qtrue) {
rb_funcall(input, intern_io_read, 2, rbufsize, parsed);
parsed = rb_funcall(input, intern_io_read, 1, rbufsize);
cptr = RSTRING_PTR(parsed);
yajl_parse_chunk((const unsigned char*)cptr, (unsigned int)strlen(cptr), wrapper->parser);
}
Expand Down

0 comments on commit 05f1bb1

Please sign in to comment.