ruby-changes:42765
From: akr <ko1@a...>
Date: Sat, 30 Apr 2016 16:56:12 +0900 (JST)
Subject: [ruby-changes:42765] akr:r54839 (trunk): Define Integer#-@ instead of Fixnum#-@.
akr 2016-04-30 17:52:49 +0900 (Sat, 30 Apr 2016) New Revision: 54839 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54839 Log: Define Integer#-@ instead of Fixnum#-@. Modified files: trunk/numeric.c Index: numeric.c =================================================================== --- numeric.c (revision 54838) +++ numeric.c (revision 54839) @@ -4869,7 +4869,7 @@ Init_Numeric(void) https://github.com/ruby/ruby/blob/trunk/numeric.c#L4869 rb_cFixnum = rb_define_class("Fixnum", rb_cInteger); - rb_define_method(rb_cFixnum, "-@", rb_int_uminus, 0); + rb_define_method(rb_cInteger, "-@", rb_int_uminus, 0); rb_define_method(rb_cFixnum, "+", fix_plus, 1); rb_define_method(rb_cFixnum, "-", fix_minus, 1); rb_define_method(rb_cFixnum, "*", fix_mul, 1); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/