Skip to content

Commit a1b8eaa

Browse files
authored
Merge pull request #689 from deivid-rodriguez/lazily_load_readline
Lazily require `readline`
2 parents 7f41bdc + 7061b06 commit a1b8eaa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/thor/line_editor/readline.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
begin
2-
require "readline"
3-
rescue LoadError
4-
end
5-
61
class Thor
72
module LineEditor
83
class Readline < Basic
94
def self.available?
5+
begin
6+
require "readline"
7+
rescue LoadError
8+
end
9+
1010
Object.const_defined?(:Readline)
1111
end
1212

0 commit comments

Comments
 (0)