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

Fixes for trunk as of svn 60140 2017-10-08 #1124

Merged
merged 1 commit into from
Oct 16, 2017
Merged
Show file tree
Hide file tree
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
9 changes: 8 additions & 1 deletion lib/yard/parser/ruby/ast_node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,14 @@ def unnamed_end_params

def double_splat_param
return nil unless YARD.ruby2?
self[-2] if self[-2].is_a?(AstNode) && self[-2].type == :ident
if (node = self[-2]).is_a?(AstNode)
if node.type == :ident
node
elsif node.type == :kwrest_param
# See https://bugs.ruby-lang.org/issues/12387
node.last
end
end
end

def block_param
Expand Down
14 changes: 11 additions & 3 deletions lib/yard/rubygems/specification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,16 @@ def _dump_with_rdoc(limit)
alias _dump_without_rdoc _dump
alias _dump _dump_with_rdoc

@@default_value[:has_rdoc] = true if defined?(@@default_value)
@@attributes << 'has_rdoc' if defined?(@@attributes)
@@nil_attributes << 'has_rdoc' if defined?(@@nil_attributes)
if class_variable_defined?(:@@default_value)
if @@default_value.frozen?
t = @@default_value.dup
t[:has_rdoc] = true
@@default_value = t.freeze
else
@@default_value[:has_rdoc] = true
end
end
@@attributes << 'has_rdoc' if class_variable_defined?(:@@attributes)
@@nil_attributes << 'has_rdoc' if class_variable_defined?(:@@nil_attributes)
end
end