Skip to content

Commit

Permalink
use Method,UnboundMethod #for_define_method in Proc#for_define_method
Browse files Browse the repository at this point in the history
  • Loading branch information
tak1n committed Feb 5, 2016
1 parent 5d2f054 commit 1a68fda
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions core/proc.rb
Expand Up @@ -246,12 +246,7 @@ def dup

def for_define_method(name, klass)
if @ruby_method
code = Rubinius::DelegatedMethod.new(name, :call, self, false)
if @ruby_method.executable.kind_of? Rubinius::CompiledCode
scope = @ruby_method.executable.scope
else
scope = nil
end
code, scope = @ruby_method.for_define_method(name, klass, self)
else
be = @block.dup
be.change_name name
Expand Down

0 comments on commit 1a68fda

Please sign in to comment.