Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ohler55 committed Sep 21, 2024
1 parent cb97cda commit 8313f80
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ext/oj/string_writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,16 +475,16 @@ static VALUE str_writer_to_s(VALUE self) {
}

/* Document-method: as_json
* call-seq: as_json()
* call-seq: as_json(*)
*
* Returns the contents of the writer as a JSON element. If called from inside
* an array or hash by Oj the raw buffer will be used othersize a more
* inefficient parse of the contents and a return of the result is
* completed. The parse uses the strict mode.
* completed. The parse uses the strict mode. Optional arguments are ignored.
*
* *return* [_Hash_|_Array_|_String_|_Integer_|_Float_|_True_|_False_|_nil|)
*/
static VALUE str_writer_as_json(VALUE self) {
static VALUE str_writer_as_json(int argc, VALUE *argv, VALUE self) {
if (string_writer_optimized) {
return self;
}
Expand Down Expand Up @@ -515,5 +515,5 @@ void oj_string_writer_init(void) {
rb_define_method(oj_string_writer_class, "reset", str_writer_reset, 0);
rb_define_method(oj_string_writer_class, "to_s", str_writer_to_s, 0);
rb_define_method(oj_string_writer_class, "raw_json", str_writer_to_s, 0);
rb_define_method(oj_string_writer_class, "as_json", str_writer_as_json, 0);
rb_define_method(oj_string_writer_class, "as_json", str_writer_as_json, -1);
}

0 comments on commit 8313f80

Please sign in to comment.