Skip to content

Commit 21bede5

Browse files
committedFeb 6, 2016
Proc#for_define_method get the scope through the newly created BlockEnvironment::AsMethod
1 parent 1a68fda commit 21bede5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed
 

‎core/proc.rb

+3-4
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,9 @@ def for_define_method(name, klass)
250250
else
251251
be = @block.dup
252252
be.change_name name
253-
code = Rubinius::BlockEnvironment::AsMethod.new(be)
254-
meth = self.dup
255-
meth.lambda_style!
256-
scope = meth.block.scope
253+
254+
code = Rubinius::BlockEnvironment::AsMethod.new(be)
255+
scope = code.block_env.scope
257256
end
258257

259258
[code, scope]

0 commit comments

Comments
 (0)
Please sign in to comment.