Skip to content
This repository has been archived by the owner on Sep 11, 2022. It is now read-only.

Outer variables are not available in Channel scope due to block.call #224

Open
snowe2010 opened this issue May 10, 2016 · 4 comments
Open

Comments

@snowe2010
Copy link

Trying to access variables created outside of the

AMQP::Channel.new do |channel|
end

block is impossible due to use of block.call to yield to the block. This is frustrating as I need to be able to access the parameters in the headers of the request.

@michaelklishin
Copy link
Member

@snowe2010 and how can this be fixed, by using yield?

@michaelklishin
Copy link
Member

Feel free to submit a pull request, by the way.

@snowe2010
Copy link
Author

I think the solution is yield. Let me work on it and I'll make a PR if I can.

@michaelklishin
Copy link
Member

@snowe2010 thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants