From: Yui NARUSE Date: 2011-06-26T18:45:29+09:00 Subject: [ruby-core:37480] [Ruby 1.9 - Bug #4537][Assigned] Incorrectly creating private method via attr_accessor Issue #4537 has been updated by Yui NARUSE. Status changed from Open to Assigned Assignee set to Koichi Sasada ---------------------------------------- Bug #4537: Incorrectly creating private method via attr_accessor http://redmine.ruby-lang.org/issues/4537 Author: Ryan LeCompte Status: Assigned Priority: Normal Assignee: Koichi Sasada Category: Target version: 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://redmine.ruby-lang.org