Sha256: 2d95a37e1801fdeb2477c6bb5771a5b4ec5b5e2b447a131162a9b4b04dc93dbf
Contents?: true
Size: 407 Bytes
Versions: 11
Compression:
Stored size: 407 Bytes
Contents
#include "float_ext.h" static VALUE cFloat; void Init_float_ext() { cFloat = rb_const_get(rb_cObject, rb_intern("Float")); rb_define_method(cFloat, "to_json", (VALUE(*)(ANYARGS)) &to_json, -1); } /** * Returns a JSON string representation for this Float 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