Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
BlockEnvironment::AsMethod#scope should return the scope of block_env
  • Loading branch information
tak1n committed Feb 6, 2016
1 parent 161a787 commit d59ca90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/block_environment.rb
Expand Up @@ -104,7 +104,7 @@ def defined_line
end

def scope
nil
@block_env.scope
end
end

Expand Down
6 changes: 4 additions & 2 deletions core/proc.rb
Expand Up @@ -251,8 +251,10 @@ def for_define_method(name, klass)
be = @block.dup
be.change_name name

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

code = executable
scope = executable.scope
end

[code, scope]
Expand Down

0 comments on commit d59ca90

Please sign in to comment.