Project

General

Profile

Bug #4537

Updated by ko1 (Koichi Sasada) about 7 years ago

``` 
 # 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 
 ``` 

Back