[MacRuby-devel] [MacRuby] #436: Strange pair(?) of bugs

MacRuby ruby-noreply at macosforge.org
Mon Nov 16 13:06:46 PST 2009

#436: Strange pair(?) of bugs
 Reporter:  macruby@…               |       Owner:  lsansonetti@…        
     Type:  defect                  |      Status:  new                  
 Priority:  blocker                 |   Milestone:  MacRuby 0.5          
Component:  MacRuby                 |    Keywords:                       
 I am writing some code, see attached, in ruby and have run into a strange
 pair of bugs, I think. I'm using 'MacRuby version 0.5 (ruby 1.9.0)
 [universal-darwin10.0, x86_64]'

 When I go to execute the attached code I have come across two problems
 which I think are bugs. First when I run this line [line 20] of code 'd =
 Test.new(9.1)' I get the following response '##-<Test:0x200274f20
 @min=9.09999999999999>' which is wrong.

 Second, when I execute this line [line 24] of code 'c << d' I get
 '[##-<Test:0x2000e5e60 @min=10.0>, ##-<Test:0x20020d2e0 @min=10.1>,
 ##-<Test:0x200274f20 @min=9.09999999999999>]' which is also wrong. It
 should look like this '[##-<Test:0x200274f20 @min=9.09999999999999>,
 ##-<Test:0x2000e5e60 @min=10.0>, ##-<Test:0x20020d2e0 @min=10.1>]' which
 it does if I execute this line of code 'c.sort!'.

 Executing all of this in 'ruby 1.8.7 (2008-08-11 patchlevel 72)
 [universal-darwin10.0]' returns the expected results.


Ticket URL: <http://www.macruby.org/trac/ticket/436>
MacRuby <http://macruby.org/>

More information about the MacRuby-devel mailing list