[ruby-cvs:61763] mrkn:r54601 (trunk): array.c: sum for Rational and Float mixed arrays

mrkn at ruby-lang.org mrkn at ruby-lang.org
Fri Apr 15 22:33:05 JST 2016


mrkn	2016-04-15 22:33:05 +0900 (Fri, 15 Apr 2016)

  New Revision: 54601

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

  Log:
    array.c: sum for Rational and Float mixed arrays
    
    * array.c (rb_ary_sum): apply the precision compensated algorithm
      for an array in which Rational and Float values are mixed.
    
    * test/ruby/test_array.rb (test_sum): add assertions for the above
      change.

  Modified files:
    trunk/ChangeLog
    trunk/array.c
    trunk/test/ruby/test_array.rb


More information about the ruby-cvs mailing list