[ruby-cvs:61340] mrkn:r54179 (trunk): * numeric.c (int_to_f, fix_to_f): rename fix_to_f to int_to_f, and add

mrkn at ruby-lang.org mrkn at ruby-lang.org
Fri Mar 18 23:52:46 JST 2016


mrkn	2016-03-18 23:52:46 +0900 (Fri, 18 Mar 2016)

  New Revision: 54179

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54179

  Log:
    * numeric.c (int_to_f, fix_to_f): rename fix_to_f to int_to_f, and add
      treatment for subclasses which don't have definitions of to_f method.
    
    * numeric.c (Integer#to_f, Fixnum#to_f): move to_f method from Fixnum
      to Integer.
    
    * ext/-test-/integer/my_integer.rb: define helper class for testing
      to_f method for a subclass of Integer.
    
    * ext/-test-/integer/extconf.rb: ditto.
    
    * ext/-test-/integer/init.c: ditto.
    
    * test/-ext-/integer/test_my_integer.rb: examine to_f method for a
      subclass of Integer.

  Added directories:
    trunk/ext/-test-/integer/
    trunk/test/-ext-/integer/
  Added files:
    trunk/ext/-test-/integer/extconf.rb
    trunk/ext/-test-/integer/init.c
    trunk/ext/-test-/integer/my_integer.c
    trunk/test/-ext-/integer/test_my_integer.rb
  Modified files:
    trunk/ChangeLog
    trunk/numeric.c


More information about the ruby-cvs mailing list