From: "ko1 (Koichi Sasada)" Date: 2012-11-26T09:19:38+09:00 Subject: [ruby-core:50123] [ruby-trunk - Bug #4537] Incorrectly creating private method via attr_accessor 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/