Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/error_highlight/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def spot
return nil if @point_type != :name
spot_lambda

when :ITER
when :ITER, :SCOPE
return nil if @point_type != :name
spot_iter

Expand Down Expand Up @@ -727,7 +727,7 @@ def spot_lambda
# define_method :foo do
# ^^
def spot_iter
_nd_fcall, nd_scope = @node.children
nd_scope = @node.type == :SCOPE ? @node : @node.children[1]
fetch_line(nd_scope.first_lineno)
if @snippet.match(/\G(?:do\b|\{)/, nd_scope.first_column)
@beg_column = $~.begin(0)
Expand Down
Loading