Sha256: d42ecb2ddf67d33e5b08cb04d0746a78f5d93d889b4e94d9c5bfb2b395288491
Contents?: true
Size: 423 Bytes
Versions: 11
Compression:
Stored size: 423 Bytes
Contents
#include "integer_ext.h" static VALUE cInteger; void Init_integer_ext() { cInteger = rb_const_get(rb_cObject, rb_intern("Integer")); rb_define_method(cInteger, "to_json", (VALUE(*)(ANYARGS)) &to_json, -1); } /** * Returns a JSON string representation for this Integer number. */ static VALUE to_json(argc, argv, self) int argc; VALUE *argv; VALUE self; { return rb_funcall(self, rb_intern("to_s"), 0); }
Version data entries
11 entries across 11 versions & 1 rubygems