diff options
Diffstat (limited to 'lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb')
-rw-r--r-- | lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb b/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb index dd39cff35d..120eadd06a 100644 --- a/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb +++ b/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb @@ -1,19 +1,19 @@ -begin - require "readline" -rescue LoadError -end - class Bundler::Thor module LineEditor class Readline < Basic def self.available? + begin + require "readline" + rescue LoadError + end + Object.const_defined?(:Readline) end def readline if echo? ::Readline.completion_append_character = nil - # Ruby 1.8.7 does not allow Readline.completion_proc= to receive nil. + # rb-readline does not allow Readline.completion_proc= to receive nil. if complete = completion_proc ::Readline.completion_proc = complete end |