Skip to content

Commit

Permalink
Merge pull request #689 from deivid-rodriguez/lazily_load_readline
Browse files Browse the repository at this point in the history
Lazily require `readline`
  • Loading branch information
rafaelfranca authored Nov 11, 2019
2 parents 7f41bdc + 7061b06 commit a1b8eaa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/thor/line_editor/readline.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
begin
require "readline"
rescue LoadError
end

class Thor
module LineEditor
class Readline < Basic
def self.available?
begin
require "readline"
rescue LoadError
end

Object.const_defined?(:Readline)
end

Expand Down

0 comments on commit a1b8eaa

Please sign in to comment.