[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
This commit is contained in:
Jun Aruga 2022-08-25 20:11:34 +02:00 коммит произвёл git
Родитель 21cac42385
Коммит 3504be1bc1
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -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