[MacRuby] #1108: Can't inherit the Module.

MacRuby ruby-noreply at macosforge.org
Mon Jan 10 06:11:03 PST 2011


#1108: Can't inherit the Module.
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     Type:  defect                |      Status:  new                  
 Priority:  blocker               |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------
 Test Script:
 {{{
 #!ruby
 class T < Module
   attr_reader :value
   def initialize(x = 1234)
     @value = x
   end

   def read
     @value
   end
 end

 t = T.new(42)
 p t.read
 p t.value

 t = T.new
 p t.read
 p t.value

 }}}

 Result:
 {{{
 $ ruby19 -v t.rb
 ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.5.0]
 42
 42
 1234
 1234

 $ macruby -v t.rb
 MacRuby 0.9 (ruby 1.9.2) [universal-darwin10.0, x86_64]
 /Users/watson/tmp/t.rb:12:in `<main>': wrong number of arguments (1 for 0)
 (ArgumentError)
 }}}

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



More information about the macruby-tickets mailing list