Navigation Menu

Skip to content

Commit

Permalink
Proc#for_define_method get the scope through the newly created BlockE…
Browse files Browse the repository at this point in the history
…nvironment::AsMethod
  • Loading branch information
tak1n committed Feb 6, 2016
1 parent 1a68fda commit 21bede5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/proc.rb
Expand Up @@ -250,10 +250,9 @@ def for_define_method(name, klass)
else
be = @block.dup
be.change_name name
code = Rubinius::BlockEnvironment::AsMethod.new(be)
meth = self.dup
meth.lambda_style!
scope = meth.block.scope

code = Rubinius::BlockEnvironment::AsMethod.new(be)
scope = code.block_env.scope
end

[code, scope]
Expand Down

0 comments on commit 21bede5

Please sign in to comment.