diff options
author | aycabta <aycabta@gmail.com> | 2019-07-06 07:13:51 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-07-06 07:19:37 +0900 |
commit | 89e178c7cb3b6ba196cfef76d9604e45849c64fc (patch) | |
tree | 08d981ab5b0bcf886918b8b6d9992528005dfd01 /lib/irb/completion.rb | |
parent | d746a41e85b746a90eef20c46d24880fe084ffc5 (diff) | |
download | ruby-89e178c7cb3b6ba196cfef76d9604e45849c64fc.tar.gz |
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.rb | 2 |
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 |