Bug #3070: Delegator#method_missing doesn't pass along block args
http://redmine.ruby-lang.org/issues/show/3070

Author: Stephen Touset
Status: Open, Priority: Normal
ruby -v: 1.8.7 (2008-08-11 patchlevel 72)

The particular instance of this bug I'm running up against is that Tempfile delegates to File. I've written a method on File which accepts a block, but any time it's called from a Tempfile, Ruby raises a LocalJumpError, because the block argument hasn't been passed.

Seems like a pretty easy fix.

  def method_missing(m, *args, &block)
    target = self.__getobj__
    unless target.respond_to?(m)
      super(m, *args, &block)
    end
    target.__send__(m, *args, &block)
  end


----------------------------------------
http://redmine.ruby-lang.org