[MacRuby] #619: Constant scope in a block is determined at run-time?
#619: Constant scope in a block is determined at run-time? --------------------------------+------------------------------------------- Reporter: chekenan@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- r3572 Following code can't run by macruby. Both ruby 1.8.7 and 1.9.1 work. {{{ module A B = "Not defined in top-level." def self.extended(base) base.class_eval do puts B end end end class C # Not include A extend A end }}} NameError: uninitialized constant C::B from /Users/dche/(irb):6:in `block' from /Users/dche/(irb):5:in `extended:' -- Ticket URL: <http://www.macruby.org/trac/ticket/619> MacRuby <http://macruby.org/>
#619: Constant scope in a block is determined at run-time? --------------------------------+------------------------------------------- Reporter: chekenan@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by rebotfc@…): I get this problem as well, could it be related to: https://www.macruby.org/trac/ticket/626 -- Ticket URL: <http://www.macruby.org/trac/ticket/619#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby