Skip to content

Commit

Permalink
Handle right hand assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Destin committed Sep 13, 2024
1 parent fa511b1 commit 81dfa08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/yard/parser/ruby/ast_node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def has_line?

# @return [Fixnum] the starting line number of the node
def line
line_range && line_range.first
line_range && line_range.begin || 1
end

# @return [String] the first line of source represented by the node.
Expand Down Expand Up @@ -345,8 +345,8 @@ def reset_line_info
elsif !children.empty?
f = children.first
l = children.last
self.line_range = Range.new(f.line_range.first, l.line_range.last)
self.source_range = Range.new(f.source_range.first, l.source_range.last)
self.line_range = Range.new(f.line_range.begin || 1, l.line_range.last)
self.source_range = Range.new(f.source_range.begin || 1, l.source_range.last)
elsif @fallback_line || @fallback_source
self.line_range = @fallback_line
self.source_range = @fallback_source
Expand Down

0 comments on commit 81dfa08

Please sign in to comment.