#309: String, Hash, Array: singleton attr_accessor cannot be defined ------------------------+--------------------------------------------------- Reporter: d...@… | Owner: lsansone...@… Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.6 Component: MacRuby | Resolution: fixed Keywords: singleton | ------------------------+--------------------------------------------------- Changes (by lsansone...@…):
* status: new => closed * resolution: => fixed * milestone: MacRuby 0.5 => MacRuby 0.6 Comment: The snippet above does not print anything anymore in trunk (as of r3489). {{{ $ cat t.rb [ false, true, nil, 1..100, /test/, Exception, Time, Hash, Array, String, Module, Object ].each do |k| s = k.is_a?(Class) ? k.new : k class << s attr_accessor :target1 def target2 :hit end end s.target1 = :hit def s.target3 :hit end puts "#{k} err: singleton attr_accessor" unless s.target1 == :hit puts "#{k} err: singleton def (#2)" unless s.target2 == :hit puts "#{k} err: singleton def (#3)" unless s.target3 == :hit end $ ./miniruby t.rb $ }}} I guess we can close the bug. -- Ticket URL: <http://www.macruby.org/trac/ticket/309#comment:5> MacRuby <http://macruby.org/> _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel