summaryrefslogtreecommitdiff
path: root/lib/irb/completion.rb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-07-06 07:13:51 +0900
committeraycabta <aycabta@gmail.com>2019-07-06 07:19:37 +0900
commit89e178c7cb3b6ba196cfef76d9604e45849c64fc (patch)
tree08d981ab5b0bcf886918b8b6d9992528005dfd01 /lib/irb/completion.rb
parentd746a41e85b746a90eef20c46d24880fe084ffc5 (diff)
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.
Diffstat (limited to 'lib/irb/completion.rb')
-rw-r--r--lib/irb/completion.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb
index f75dd0ebcd..84b1ad982c 100644
--- a/lib/irb/completion.rb
+++ b/lib/irb/completion.rb
@@ -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