diff options
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 21 |
1 files changed, 2 insertions, 19 deletions
@@ -4715,30 +4715,14 @@ rb_int_abs(VALUE num) return Qnil; } -/* - * Document-method: Integer#size - * call-seq: - * int.size -> int - * - * Returns the number of bytes in the machine representation of +int+ - * (machine dependent). - * - * 1.size #=> 8 - * -1.size #=> 8 - * 2147483647.size #=> 8 - * (256**10 - 1).size #=> 10 - * (256**20 - 1).size #=> 20 - * (256**40 - 1).size #=> 40 - */ - static VALUE fix_size(VALUE fix) { return INT2FIX(sizeof(long)); } -static VALUE -int_size(VALUE num) +MJIT_FUNC_EXPORTED VALUE +rb_int_size(VALUE num) { if (FIXNUM_P(num)) { return fix_size(num); @@ -5458,7 +5442,6 @@ Init_Numeric(void) rb_define_method(rb_cInteger, "<<", rb_int_lshift, 1); rb_define_method(rb_cInteger, ">>", rb_int_rshift, 1); - rb_define_method(rb_cInteger, "size", int_size, 0); rb_define_method(rb_cInteger, "digits", rb_int_digits, -1); /* An obsolete class, use Integer */ |