Skip to content

Commit

Permalink
Implement Proc#for_define_method when @ruby_method is nil like in the…
Browse files Browse the repository at this point in the history
… old impl to ensure the same behavior
  • Loading branch information
tak1n committed Feb 7, 2016
1 parent d59ca90 commit eb465ca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/proc.rb
Expand Up @@ -251,10 +251,11 @@ def for_define_method(name, klass)
be = @block.dup
be.change_name name

executable = Rubinius::BlockEnvironment::AsMethod.new(be)
duped_proc = self.dup
duped_proc.lambda_style!

code = executable
scope = executable.scope
code = Rubinius::BlockEnvironment::AsMethod.new(be)
scope = duped_proc.block.scope
end

[code, scope]
Expand Down

0 comments on commit eb465ca

Please sign in to comment.