ext/oj/fast.c in oj-2.12.14 vs ext/oj/fast.c in oj-2.13.0

- old
+ new

@@ -1587,10 +1587,16 @@ #if 0 // hack to keep the doc generator happy Oj = rb_define_module("Oj"); #endif +static VALUE +doc_not_implemented(VALUE self) { + rb_raise(rb_eNotImpError, "Not implemented."); + return Qnil; +} + /* Document-class: Oj::Doc * * The Doc class is used to parse and navigate a JSON document. The model it * employs is that of a document that while open can be navigated and values * extracted. Once the document is closed the document can not longer be @@ -1651,6 +1657,9 @@ rb_define_method(oj_doc_class, "each_child", doc_each_child, -1); rb_define_method(oj_doc_class, "each_value", doc_each_value, -1); rb_define_method(oj_doc_class, "dump", doc_dump, -1); rb_define_method(oj_doc_class, "size", doc_size, 0); rb_define_method(oj_doc_class, "close", doc_close, 0); + + rb_define_method(oj_doc_class, "clone", doc_not_implemented, 0); + rb_define_method(oj_doc_class, "dup", doc_not_implemented, 0); }