[MacRuby] #1430: calling super in define_singleton_method procs results in NoMethodError

MacRuby ruby-noreply at macosforge.org
Tue Dec 13 16:49:17 PST 2011


#1430: calling super in define_singleton_method procs results in NoMethodError
--------------------------------+-------------------------------------------
 Reporter:  lastobelus@…        |       Owner:  lsansonetti@…        
     Type:  defect              |      Status:  new                  
 Priority:  blocker             |   Milestone:                       
Component:  MacRuby             |    Keywords:                       
--------------------------------+-------------------------------------------
 {{{

 class Bob
   def howdy
     puts "orig howdy"
   end
 end
 b=Bob.new
 b.define_singleton_method(:howdy){ super(); puts "new howdy"}
 b.howdy

 # ruby 1.9.2p290
 > b.howdy
 orig howdy
 new howdy
  => nil

 # macruby 0.12
 > b.howdy
 NoMethodError: super called outside of method
 }}}

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



More information about the macruby-tickets mailing list