From: shyouhei@... Date: 2016-10-11T08:39:47+00:00 Subject: [ruby-core:77561] [Ruby trunk Bug#4537][Closed] Incorrectly creating private method via attr_accessor Issue #4537 has been updated by Shyouhei Urabe. Status changed from Assigned to Closed ruby -v changed from ruby 1.9.2p180 (2011-02-18 revision 30907) [x86_64-darwin10.7.0] to ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15] ---------------------------------------- Bug #4537: Incorrectly creating private method via attr_accessor https://bugs.ruby-lang.org/issues/4537#change-60832 * Author: Ryan LeCompte * Status: Closed * Priority: Normal * Assignee: Nobuyoshi Nakada * ruby -v: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15] * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- # 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 -- https://bugs.ruby-lang.org/ Unsubscribe: