Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle right hand assignment #3

Merged
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
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