ext/yajl/yajl_ext.c in yajl-ruby-1.4.2 vs ext/yajl/yajl_ext.c in yajl-ruby-1.4.3

- old
+ new

@@ -1377,10 +1377,11 @@ cParseError = rb_define_class_under(mYajl, "ParseError", rb_eStandardError); cEncodeError = rb_define_class_under(mYajl, "EncodeError", rb_eStandardError); cStandardError = rb_const_get(rb_cObject, rb_intern("StandardError")); cParser = rb_define_class_under(mYajl, "Parser", rb_cObject); + rb_undef_alloc_func(cParser); rb_define_singleton_method(cParser, "new", rb_yajl_parser_new, -1); rb_define_method(cParser, "initialize", rb_yajl_parser_init, -1); rb_define_method(cParser, "parse", rb_yajl_parser_parse, -1); rb_define_method(cParser, "parse_chunk", rb_yajl_parser_parse_chunk, 1); rb_define_method(cParser, "<<", rb_yajl_parser_parse_chunk, 1); @@ -1388,9 +1389,10 @@ cProjector = rb_define_class_under(mYajl, "Projector", rb_cObject); rb_define_method(cProjector, "project", rb_yajl_projector_project, 1); cEncoder = rb_define_class_under(mYajl, "Encoder", rb_cObject); + rb_undef_alloc_func(cEncoder); rb_define_singleton_method(cEncoder, "new", rb_yajl_encoder_new, -1); rb_define_method(cEncoder, "initialize", rb_yajl_encoder_init, -1); rb_define_method(cEncoder, "encode", rb_yajl_encoder_encode, -1); rb_define_method(cEncoder, "on_progress=", rb_yajl_encoder_set_progress_cb, 1);