[ruby-cvs:61835] usa:r54673 (ruby_2_2): merge revision(s) 53381, 53382, 53511, 53512: [Backport #11916]

usa at ruby-lang.org usa at ruby-lang.org
Fri Apr 22 14:22:55 JST 2016

usa	2016-04-22 14:22:55 +0900 (Fri, 22 Apr 2016)

  New Revision: 54673


    merge revision(s) 53381,53382,53511,53512: [Backport #11916]
    * lib/forwardable.rb (def_instance_delegator) fix delegating to
      'args' and 'block', clashing with local variables in generated
      methods.  [ruby-core:72579] [Bug #11916]
    * lib/forwardable.rb (def_single_delegator): ditto.
    * 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.
      This change is to revert unexpected incompatibility. But this behavior

  Added files:
  Modified directories:
  Modified files:

More information about the ruby-cvs mailing list