Created
February 18, 2012 19:14
-
-
Save ileitch/1860696 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| => class Foo | |
| => p = Proc.new {} | |
| => define_method :a, p | |
| => define_method :b, p | |
| => end | |
| => | |
| => foo = Foo.new | |
| => foo.method(:a) | |
| [] | |
| => foo.method(:b) | |
| [] | |
| diff --git a/kernel/common/method.rb b/kernel/common/method.rb | |
| index 1ae6585..c27d53d 100644 | |
| --- a/kernel/common/method.rb | |
| +++ b/kernel/common/method.rb | |
| @@ -19,6 +19,9 @@ class Method | |
| # Module that the method is defined in. | |
| def initialize(receiver, defined_in, executable, name) | |
| + if executable.kind_of?(Rubinius::BlockEnvironment::AsMethod) | |
| + p executable.instance_variable_get("@block_env").instance_variables | |
| + end | |
| @receiver = receiver | |
| @defined_in = defined_in | |
| @executable = executable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment