From 89e178c7cb3b6ba196cfef76d9604e45849c64fc Mon Sep 17 00:00:00 2001 From: aycabta Date: Sat, 6 Jul 2019 07:13:51 +0900 Subject: 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. --- lib/irb/completion.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/irb/completion.rb') 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 -- cgit v1.2.3