diff options
author | Jun Aruga <[email protected]> | 2022-08-25 20:11:34 +0200 |
---|---|---|
committer | git <[email protected]> | 2022-08-26 09:57:02 +0900 |
commit | 3504be1bc13235407e01f55d3df6fe0b4cb5ba9e (patch) | |
tree | e894167cf896859838270b5a500ca626a60040cc /lib/irb/input-method.rb | |
parent | 21cac42385e1a116d287e155e461453b830640d2 (diff) |
[ruby/irb] Require RDoc in `input-method.rb` again in a limited scope.
RDoc is implemented as soft dependency in IRB. See how the rdoc is required in
the files. I reverted the commit below.
```
$ grep -ril rdoc lib/
lib/irb/cmd/help.rb
lib/irb/completion.rb
lib/irb/easter-egg.rb
lib/irb/input-method.rb
```
---
Revert "Remove `require` in signal handler to avoid ThreadError"
This reverts commit https://github.com/ruby/irb/commit/5f749c613c89.
https://github.com/ruby/irb/commit/b24852058f
Diffstat (limited to 'lib/irb/input-method.rb')
-rw-r--r-- | lib/irb/input-method.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb index a8227caa9c..b77fd3207d 100644 --- a/lib/irb/input-method.rb +++ b/lib/irb/input-method.rb @@ -320,6 +320,11 @@ module IRB [195, 164], # The "ä" that appears when Alt+d is pressed on xterm. [226, 136, 130] # The "∂" that appears when Alt+d in pressed on iTerm2. ] + begin + require 'rdoc' + rescue LoadError + return nil + end if just_cursor_moving and completion_journey_data.nil? return nil |