lib/yard/handlers/ruby/alias_handler.rb in yard-0.9.19 vs lib/yard/handlers/ruby/alias_handler.rb in yard-0.9.20

- old
+ new

@@ -5,17 +5,18 @@ namespace_only process do names = [] if statement.type == :alias - names = statement.map {|o| o.jump(:ident, :op, :kw, :const).source } + nodes = [:ident, :op, :kw, :const, :tstring_content, :string_content] + names = statement.map {|o| o.jump(*nodes).source } elsif statement.call? statement.parameters(false).each do |obj| case obj.type - when :symbol_literal, :dyna_symbol + when :symbol_literal names << obj.jump(:ident, :op, :kw, :const).source - when :string_literal - names << obj.jump(:string_content).source + when :string_literal, :dyna_symbol + names << obj.jump(:string_content, :tstring_content).source end end end raise YARD::Parser::UndocumentableError, "alias/alias_method" if names.size != 2