Project

General

Profile

Actions

Bug #12393

closed

SingleForwardable broken in 2.2.5

Added by RichSeviora (Richard Seviora) over 8 years ago. Updated over 5 years ago.

Status:
Closed
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'
Actions #1

Updated by jeremyevans0 (Jeremy Evans) over 5 years ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0