diff options
author | aycabta <aycabta@gmail.com> | 2019-05-29 06:08:25 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-05-29 06:57:47 +0900 |
commit | d341bb285768ae70bc8d251e577181c57322968c (patch) | |
tree | ebc891008eb17c265ee2442de8b7a221b6c0fc6b /lib | |
parent | d390af3686d640dd2aa54af51ed5c2a8e581a46e (diff) | |
download | ruby-d341bb285768ae70bc8d251e577181c57322968c.tar.gz |
IRB never show RubyVM's doc
Diffstat (limited to 'lib')
-rw-r--r-- | lib/irb/completion.rb | 12 | ||||
-rw-r--r-- | lib/irb/ruby_logo.aa | 38 |
2 files changed, 49 insertions, 1 deletions
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) diff --git a/lib/irb/ruby_logo.aa b/lib/irb/ruby_logo.aa new file mode 100644 index 0000000000..043e6f85fb --- /dev/null +++ b/lib/irb/ruby_logo.aa @@ -0,0 +1,38 @@ + + -+smJYYN?mm- + HB"BBYT TQg NggT + 9Q+g Nm,T 8g NJW + YS+ N2NJ"Sg N? + BQg #( gT Nggggk J + 5j NJ NJ NNge + #Q #JJ NgT N( + @j bj mT J + Bj @/d NJ ( + #q #(( NgT #J + 5d #(t mT $d + #q @(@J NJB; + @( 5d ? HHH H HQmgggggggmN qD + 5d #uN 2QdH E O + 5 5JSd Nd NJH @d j + Fd @J4d s NQH #d ( + #( #o6d Nd NgH #d #d + 4 B&Od v NgT #d F + #( 9JGd NH NgUd F + #d #GJQ d NP $ + #J #U+#Q N Q # j + j /W BQ+ BQ d NJ NJ + - NjJH HBIjTQggPJQgW N W k #J + #J b HYWgggN j s Nag d NN b #d + #J 5- D s Ngg N d Nd F + Fd BKH2 #+ s NNgg J Q J ] + F H @ J N y K(d P I + F4 E N? #d y #Q NJ E j + F W Nd q m Bg NxW N(H- + F d b @ m Hd gW vKJ + NJ d K d s Bg aT FDd + b # d N m BQ mV N> + e5 Nd #d NggggggQWH HHHH NJ - + m7 NW H N HSVO1z=?11- + NgTH bB kH WBHWWHBHWmQgg&gggggNNN + NNggggggNN + |