Project

General

Profile

Bug #12393

SingleForwardable broken in 2.2.5

Added by RichSeviora (Richard Seviora) over 3 years ago. Updated 26 days ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin15]
[ruby-core:<unknown>]

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'

History

#1

Updated by jeremyevans0 (Jeremy Evans) 26 days ago

  • Status changed from Open to Closed

Also available in: Atom PDF