From d341bb285768ae70bc8d251e577181c57322968c Mon Sep 17 00:00:00 2001 From: aycabta Date: Wed, 29 May 2019 06:08:25 +0900 Subject: IRB never show RubyVM's doc --- lib/irb/completion.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/irb/completion.rb') diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb index b9142bd598..516e90c3d3 100644 --- a/lib/irb/completion.rb +++ b/lib/irb/completion.rb @@ -268,7 +268,17 @@ module IRB end RDocRIDriver = RDoc::RI::Driver.new - PerfectMatchedProc = proc { |matched| + PerfectMatchedProc = ->(matched) { + if matched =~ /\A(?:::)?RubyVM/ + File.open(File.join(__dir__, 'ruby_logo.aa')) do |f| + RDocRIDriver.page do |io| + f.each_line do |l| + io.write(l) + end + end + end + return + end namespace = retrieve_completion_data(matched, true) return unless matched if namespace.is_a?(Array) -- cgit v1.2.3