[MacRuby] #309: String, Hash, Array: singleton attr_accessor cannot be defined
#309: String, Hash, Array: singleton attr_accessor cannot be defined ------------------------+--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: singleton ------------------------+--------------------------------------------------- {{{ [ 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 }}} result is: {{{ NSMutableDictionary err: singleton attr_accessor NSMutableArray err: singleton attr_accessor NSMutableString err: singleton attr_accessor }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/309> MacRuby <http://macruby.org/>
#309: String, Hash, Array: singleton attr_accessor cannot be defined ------------------------+--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: singleton ------------------------+--------------------------------------------------- Comment(by dev@…): I attached a patch with 3 failing tests for that ticket! -- Ticket URL: <http://www.macruby.org/trac/ticket/309#comment:1> MacRuby <http://macruby.org/>
#309: String, Hash, Array: singleton attr_accessor cannot be defined ------------------------+--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: singleton ------------------------+--------------------------------------------------- Comment(by eloy.de.enige@…): Applied in r2592, thanks! And I've added tags for them in r2593. Unfortunately I got the git svn command to add the authors name to the messages wrong, so you're name is not in the message… But that's what we get with svn. -- Ticket URL: <http://www.macruby.org/trac/ticket/309#comment:2> MacRuby <http://macruby.org/>
On Sep 21, 2009, at 1:28 AM, MacRuby wrote:
#309: String, Hash, Array: singleton attr_accessor cannot be defined ------------------------ +--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: singleton ------------------------ +---------------------------------------------------
Comment(by eloy.de.enige@…):
Applied in r2592, thanks! And I've added tags for them in r2593.
Unfortunately I got the git svn command to add the authors name to the messages wrong, so you're name is not in the message… But that's what we get with svn.
The subversion repo allows for revprop editing, so you can fix the commit message if you like. -Bill
On Sep 21, 2009, at 7:58 PM, William Siegrist wrote:
On Sep 21, 2009, at 1:28 AM, MacRuby wrote:
#309: String, Hash, Array: singleton attr_accessor cannot be defined ------------------------ +--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: singleton ------------------------ +---------------------------------------------------
Comment(by eloy.de.enige@…):
Applied in r2592, thanks! And I've added tags for them in r2593.
Unfortunately I got the git svn command to add the authors name to the messages wrong, so you're name is not in the message… But that's what we get with svn.
The subversion repo allows for revprop editing, so you can fix the commit message if you like.
-Bill
Great, thanks for the info! I'll do a svn checkout tonight to fix it. Eloy
#309: String, Hash, Array: singleton attr_accessor cannot be defined ------------------------+--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: singleton ------------------------+--------------------------------------------------- Comment(by dev@…): It is a pity, I commit patches only to become famous! But, nevertheless, seriously, this is already a reason to substitute svn by git! ;-) -- Ticket URL: <http://www.macruby.org/trac/ticket/309#comment:3> MacRuby <http://macruby.org/>
#309: String, Hash, Array: singleton attr_accessor cannot be defined ------------------------+--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: singleton ------------------------+--------------------------------------------------- Comment(by eloy.de.enige@…): Replying to [comment:3 dev@…]:
It is a pity, I commit patches only to become famous!
Well, obviously! ;-)
But, nevertheless, seriously, this is already a reason to substitute svn by git! ;-)
I personally find it unfortunate that we need to use svn and git is only a mirror, but this is just the way it is gonna be… -- Ticket URL: <http://www.macruby.org/trac/ticket/309#comment:4> MacRuby <http://macruby.org/>
#309: String, Hash, Array: singleton attr_accessor cannot be defined ------------------------+--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.6 Component: MacRuby | Resolution: fixed Keywords: singleton | ------------------------+--------------------------------------------------- Changes (by lsansonetti@…): * 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/>
participants (3)
-
Eloy Duran
-
MacRuby
-
William Siegrist