Skip to content

Commit

Permalink
Return correct source_location for multi-line procs
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed May 16, 2012
1 parent 17e8c06 commit 4c55c92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/common/block_environment.rb
Expand Up @@ -88,7 +88,7 @@ def file
end

def line
@code.line_from_ip(0)
@code.defined_line
end

class AsMethod < Executable
Expand Down
1 change: 1 addition & 0 deletions lib/compiler/ast/sends.rb
Expand Up @@ -558,6 +558,7 @@ def bytecode(g)
blk = new_block_generator g, @arguments

blk.push_state self
blk.definition_line @line
blk.state.push_super state.super
blk.state.push_eval state.eval

Expand Down

0 comments on commit 4c55c92

Please sign in to comment.