[MacRuby] #1364: NameError: uninitialized class variable in NSObject
#1364: NameError: uninitialized class variable in NSObject -------------------------------------------+-------------------------------- Reporter: satoh@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.11 Component: MacRuby | Keywords: class variables, @@ -------------------------------------------+-------------------------------- satoh-MBP:trunk satounorio$ rvm use macruby Using /Users/satounorio/.rvm/gems/macruby-0.10 satoh-MBP:trunk satounorio$ irb irb(main):001:0> module M irb(main):002:1> @@hello = "hello" irb(main):003:0> end => "hello" irb(main):004:0> include M => NSObject irb(main):005:0> @@hello NameError: uninitialized class variable @@hello in NSObject irb(main):006:0> M.class_variables_get(:@@hello) NoMethodError: undefined method `class_variables_get' for M:Class irb(main):007:0> M.class_variable_get(:@@hello) => "hello" irb(main):008:0> -- Ticket URL: <http://www.macruby.org/trac/ticket/1364> MacRuby <http://macruby.org/>
#1364: NameError: uninitialized class variable in NSObject -------------------------------------------+-------------------------------- Reporter: satoh@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: class variables, @@ -------------------------------------------+-------------------------------- Changes (by lsansonetti@…): * milestone: MacRuby 0.11 => Old description:
satoh-MBP:trunk satounorio$ rvm use macruby Using /Users/satounorio/.rvm/gems/macruby-0.10 satoh-MBP:trunk satounorio$ irb irb(main):001:0> module M irb(main):002:1> @@hello = "hello" irb(main):003:0> end => "hello" irb(main):004:0> include M => NSObject irb(main):005:0> @@hello NameError: uninitialized class variable @@hello in NSObject
irb(main):006:0> M.class_variables_get(:@@hello) NoMethodError: undefined method `class_variables_get' for M:Class
irb(main):007:0> M.class_variable_get(:@@hello) => "hello" irb(main):008:0>
New description: {{{ satoh-MBP:trunk satounorio$ rvm use macruby Using /Users/satounorio/.rvm/gems/macruby-0.10 satoh-MBP:trunk satounorio$ irb irb(main):001:0> module M irb(main):002:1> @@hello = "hello" irb(main):003:0> end => "hello" irb(main):004:0> include M => NSObject irb(main):005:0> @@hello NameError: uninitialized class variable @@hello in NSObject irb(main):006:0> M.class_variables_get(:@@hello) NoMethodError: undefined method `class_variables_get' for M:Class irb(main):007:0> M.class_variable_get(:@@hello) => "hello" irb(main):008:0> }}} -- -- Ticket URL: <http://www.macruby.org/trac/ticket/1364#comment:1> MacRuby <http://macruby.org/>
#1364: NameError: uninitialized class variable in NSObject -------------------------------------------+-------------------------------- Reporter: satoh@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: class variables, @@ -------------------------------------------+-------------------------------- Comment(by lsansonetti@…): Indeed: {{{ $ ./miniruby -e "module M; @@hello=42; end; include M; p @@hello" -e:1:in `<main>': uninitialized class variable @@hello in NSObject (NameError) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1364#comment:2> MacRuby <http://macruby.org/>
#1364: NameError: uninitialized class variable in NSObject -------------------------------------------+-------------------------------- Reporter: satoh@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: class variables, @@ | -------------------------------------------+-------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Should be fixed in https://github.com/MacRuby/MacRuby/commit/ee78786256b1b96f559dad53ef87759093... -- Ticket URL: <http://www.macruby.org/trac/ticket/1364#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby