Skip to content
Permalink
Browse files
use Method,UnboundMethod #for_define_method in Proc#for_define_method
  • Loading branch information
tak1n committed Feb 5, 2016
1 parent 5d2f054 commit 1a68fdaac294d74426e7f39f492de682056eb327
Showing with 1 addition and 6 deletions.
  1. +1 −6 core/proc.rb
@@ -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

0 comments on commit 1a68fda

Please sign in to comment.