[ruby-cvs:60672] sorah:r53511 (trunk): * lib/forwardable.rb: Convert given accessors to String.

sorah at ruby-lang.org sorah at ruby-lang.org
Tue Jan 12 20:19:25 JST 2016


sorah	2016-01-12 20:19:25 +0900 (Tue, 12 Jan 2016)

  New Revision: 53511

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53511

  Log:
    * lib/forwardable.rb: Convert given accessors to String.
    
      r53381 changed to accept only Symbol or String for accessors, but
      there are several rubygems that pass classes (e.g. Array,
      Hash, ...) as accessors. Prior r53381, it was accepted because Class#to_s
      returns its class name. After r53381 given accessors are checked
      with define_method, but it accepts only Symbol or String, otherwise
      raises TypeError.
    
          def_delegator Foo, :some_method
    
      This change is to revert unwanted incompatibility. But this behavior
      may change in the future.

  Modified files:
    trunk/ChangeLog
    trunk/lib/forwardable.rb


More information about the ruby-cvs mailing list