Issue #4537 has been updated by ko1 (Koichi Sasada).

Target version changed from 2.0.0 to next minor

No discussion.

----------------------------------------
Bug #4537: Incorrectly creating private method via attr_accessor
https://bugs.ruby-lang.org/issues/4537#change-33906

Author: ryanlecompte (Ryan LeCompte)
Status: Assigned
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: next minor
ruby -v: ruby 1.9.2p180 (2011-02-18 revision 30907) [x86_64-darwin10.7.0]


# The following fails with a failure to call "x=" private method
String.send(:attr_accessor, :x)
s = ""
s.x = 100

# The following works:
class String
  self.send(:attr_accessor, :x)
end
s = ""
s.x = 100


-- 
http://bugs.ruby-lang.org/