[MacRuby] #1096: Operator redefinition fails (Fixnum)
MacRuby
ruby-noreply at macosforge.org
Thu Jan 6 05:06:13 PST 2011
#1096: Operator redefinition fails (Fixnum)
--------------------------------------+-------------------------------------
Reporter: Knut.Olaf.Lien@… | Owner: lsansonetti@…
Type: defect | Status: reopened
Priority: blocker | Milestone:
Component: MacRuby | Resolution:
Keywords: |
--------------------------------------+-------------------------------------
Comment(by watson1978@…):
{{{
$ cat test.rb
class Fixnum
def +(o)
self-o
end
end
p 4+2
$ macruby test.rb
2
$ macirb
irb(main):001:0> load "test.rb"
2
=> true
$ macirb
irb(main):001:0> class Fixnum
irb(main):002:1> def +(o)
irb(main):003:2> self - o
irb(main):004:1> end
irb(main):005:0> end
=> nil
irb(main):006:0> p 4 + 2
6
=> 6
}}}
I wrote your code within macirb, I reproduced. [[BR]]
but, used only MacRuby and loaded test core within macirb, I did not.
Probably it will be a problem of macirb.
--
Ticket URL: <http://www.macruby.org/trac/ticket/1096#comment:4>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list