Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delegate does not pass block through when object does not implement method #1078

headius opened this Issue Oct 3, 2013 · 2 comments


None yet
2 participants
Copy link

headius commented Oct 3, 2013

When the method being delegated to does not actually implement the called method, our native delegate logic (NativeDelegate) is not passing the block through to the call.

For example, this code produces an enumerator instead of the final array:

require 'delegate'

hash = { "key" => "value" }

class Wrapper < SimpleDelegator

wrapped_hash =

wrapped_wrapped_hash =

p { |key, value| [key,value] }

Fix coming.

@headius headius closed this in 2a8ff74 Oct 3, 2013


This comment has been minimized.

Copy link
Member Author

headius commented Oct 3, 2013

@atambo Can you turn your example into a test case? I'm trying to fix other things for release right now and will probably forget.

atambo added a commit that referenced this issue Oct 3, 2013


This comment has been minimized.

Copy link

atambo commented Oct 3, 2013

@headius, done in dd08c7b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.