Skip to content

Commit

Permalink
Require RDoc in input-method.rb again in a limited scope.
Browse files Browse the repository at this point in the history
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 5f749c6.
  • Loading branch information
junaruga authored and hsbt committed Aug 26, 2022
1 parent 54c8df0 commit b248520
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/irb/input-method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,11 @@ def auto_indent(&block)
[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
Expand Down

0 comments on commit b248520

Please sign in to comment.