[MacRuby-devel] [MacRuby] #370: Inconsistency between macruby and ruby in a simple class
MacRuby
ruby-noreply at macosforge.org
Fri Oct 9 01:24:53 PDT 2009
#370: Inconsistency between macruby and ruby in a simple class
-----------------------------------+----------------------------------------
Reporter: kfowler@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: major | Milestone: MacRuby 0.5
Component: MacRuby | Keywords:
-----------------------------------+----------------------------------------
running this script:
{{{
class W
def initialize(w)
@w = w
end
end
class M
def initialize(m)
@m = m
end
end
printf("%s\n" , W.new(W.new(1)).inspect)
printf("%s\n" , M.new(M.new(1)).inspect)
printf("%s\n" , W.new(M.new(1)).inspect)
printf("%s\n" , M.new(W.new(1)).inspect)
}}}
on ruby1.9 from mac ports (ruby 1.9.1p243 (2009-07-16 revision 24175)
[i386-darwin10]) yields this:
{{{
#<W:0x0000010084ecd8 @w=#<W:0x0000010084edf0 @w=1>>
#<M:0x0000010084e370 @m=#<M:0x0000010084e3e0 @m=1>>
#<W:0x0000010084dd88 @w=#<M:0x0000010084de30 @m=1>>
#<M:0x0000010084d618 @m=#<W:0x0000010084d7a0 @w=1>>
}}}
on macruby 0.5 (MacRuby version 0.5 (ruby 1.9.0) [universal-darwin10.0,
x86_64]) built from source
(http://svn.macosforge.org/repository/ruby/MacRuby/trunk@2771) against
llvm (https://llvm.org/svn/llvm-project/llvm/trunk@82747) yields this:
{{{
##-<W:0x20001cc00 @w=1>
##-<M:0x20001cfe0 @m=1>
##-<W:0x20001d260 @w=##-<M:0x20001d2a0 @m=1>>
##-<M:0x2000162a0 @m=##-<W:0x2000162e0 @w=1>>
}}}
Ruby 1.8.7 from 10.6:
{{{
#<W:0x1001558c8 @w=#<W:0x1001558f0 @w=1>>
#<M:0x100155788 @m=#<M:0x1001557b0 @m=1>>
#<W:0x100155670 @w=#<M:0x100155698 @m=1>>
#<M:0x100155558 @m=#<W:0x100155580 @w=1>>
}}}
jruby 1.3.1:
{{{
#<W:0x141dddba @w=#<W:0x6d732ed2 @w=1>>
#<M:0x60c9630a @m=#<M:0x4585572a @m=1>>
#<W:0x351daa0e @w=#<M:0x2e879860 @m=1>>
#<M:0x4824de7d @m=#<W:0x6c8b058b @w=1>>
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/370>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list