1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix showing document of ClassName.method_name in IRB

In IRB, Time.new is split as "Time", ".", and "new". The receiver "Time"
is processed by #class method but it means that "Time" changes to
"Class". This commit fixes it.
This commit is contained in:
aycabta 2019-07-06 07:13:51 +09:00
parent d746a41e85
commit 89e178c7cb

View file

@ -237,7 +237,7 @@ module IRB
candidates.uniq!
end
if doc_namespace
"#{rec.class.name}#{sep}#{candidates.find{ |i| i == message }}"
"#{rec.name}#{sep}#{candidates.find{ |i| i == message }}"
else
select_message(receiver, message, candidates, sep)
end