Actions
Bug #12393
closedSingleForwardable broken in 2.2.5
ruby -v:
ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin15]
Description
The change to forwardable.rb
in 2.2.5 seem to have broken the instance delegation method.
As per the example in the code, running the following now generates a NoMethodError
for method_defined?
.
printer = String.new
printer.extend SingleForwardable
printer.def_delegator "STDOUT", "puts" # Generates error here.
printer.puts "Howdy!" # Cannot reach
Generates error:
NoMethodError: undefined method `method_defined?' for "":String
from /Users/richardseviora/.rbenv/versions/2.2.5/lib/ruby/2.2.0/forwardable.rb:278:in `def_single_delegator'
Updated by jeremyevans0 (Jeremy Evans) over 5 years ago
- Status changed from Open to Closed
Actions
Like0
Like0