Project

General

Profile

« Previous | Next » 

Revision b7622d79

Added by st0012 (Stan Lo) over 2 years ago

[ruby/irb] Move require out of repeated execution path

SHOW_DOC_DIALOG will be called repeatedly whenever the corresponding key
is pressed, but we only need to require rdoc once. So ideally the
require can be put outside of the proc.

And because when rdoc is not available the entire proc will be
nonfunctional, we can stop registering the SHOW_DOC_DIALOG if we failed
to require rdoc.

https://github.com/ruby/irb/commit/b1278b7320