From: "NARUSE, Yui" Date: 2011-08-27T17:32:50+09:00 Subject: [ruby-core:39138] Re: [Ruby 1.9 - Bug #5227][Assigned] Float#round fails on corner cases (2011/08/27 4:40), Marc-Andre Lafortune wrote: > On Thu, Aug 25, 2011 at 9:46 PM, Yui NARUSE wrote: >> r33061 tried to fix this but the result isn't changed. > > Sorry, I do not understand. r33061 fixes Integer#round, which had a > completely different issue from Float#round (see redmine #5228) ./ruby -ve'p 42.0.round(308)' ruby 1.9.4dev (2011-08-26 trunk 33073) [x86_64-freebsd8.2] Infinity >> Additional to say: >> * add test for this to test/ruby/test_float.rb > > I already committed tests in RubySpec, which I believe is where they > are the most useful. Adding tests to RubySpec is not enough. You should also add tests to CRuby's test-all. Moreover it fails on my environment: 2) Float#round works for corner cases FAILED Expected Infinity to equal 42.0 /usr/home/chkbuild/build/ruby-trunk/20110827T070101Z/rubyspec/core/float/round_spec.rb:30:in `block (4 levels) in ' /usr/home/chkbuild/build/ruby-trunk/20110827T070101Z/rubyspec/core/float/round_spec.rb:3:in `' http://59.106.172.211/~chkbuild/ruby-trunk/log/20110827T070101Z.log.html.gz http://59.106.172.211/~chkbuild/ruby-trunk/recent.html >> * write Ticket number in ChangeLog and commit message >> (this is current limitation of Redmine-commit association) > > Ah, thanks, I didn't realize this had changed. I updated the > contributer guidelines wiki page ( > http://redmine.ruby-lang.org/projects/ruby/wiki/CommitterHowto ) but I > don't have write access to another that should be updated accordingly: > http://redmine.ruby-lang.org/projects/redmine/wiki/VersionControlSystem > > Can someone either give me access or update it? Added. -- NARUSE, Yui