diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2013-12-16 14:16:42 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2013-12-16 14:16:42 -0800 |
commit | 58411ea2a9dc1e63150a3c4c496218d817d7cf9f (patch) | |
tree | db2820254f32ee412d393102a6a191e3d68c3d15 /ext | |
parent | 2924efc55aec224542349d1b92a019edf167f132 (diff) | |
download | ffi-yajl-58411ea2a9dc1e63150a3c4c496218d817d7cf9f.tar.gz |
remove Object#to_json from C ext
Diffstat (limited to 'ext')
-rw-r--r-- | ext/ffi_yajl/ext/encoder/encoder.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/ext/ffi_yajl/ext/encoder/encoder.c b/ext/ffi_yajl/ext/encoder/encoder.c index ee02435..f4999b8 100644 --- a/ext/ffi_yajl/ext/encoder/encoder.c +++ b/ext/ffi_yajl/ext/encoder/encoder.c @@ -157,16 +157,6 @@ static VALUE rb_cString_ffi_yajl(VALUE self, VALUE yajl_gen, VALUE state) { return Qnil; } -static VALUE rb_cObject_to_json(VALUE self, VALUE args) { - // FIXME: probably a bit too honeybadger about ignoring the arity of this function completely - ID sym_to_s = rb_intern("to_s"); - VALUE str; - - str = rb_funcall(self, sym_to_s, 0); - str = rb_str_concat(rb_str_concat(rb_str_new2("\""), str), rb_str_new2("\"")); - return str; -} - static VALUE rb_cObject_ffi_yajl(VALUE self, VALUE yajl_gen, VALUE state) { ID sym_to_json = rb_intern("to_json"); VALUE str; @@ -193,7 +183,5 @@ void Init_encoder() { rb_define_method(rb_cFloat, "ffi_yajl", rb_cFloat_ffi_yajl, 2); rb_define_method(rb_cString, "ffi_yajl", rb_cString_ffi_yajl, 2); rb_define_method(rb_cObject, "ffi_yajl", rb_cObject_ffi_yajl, 2); -// FIXME: make this conditional on ActiveSupport not being defined: - rb_define_method(rb_cObject, "to_json", rb_cObject_to_json, -2); } |