diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-11-13 07:57:02 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2019-11-13 10:19:51 +0900 |
commit | bb9ecd026a6cadd5d0f85ac061649216806ed935 (patch) | |
tree | 237975b9702a837fd0a8d24575f1edadb4d773d0 /lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb | |
parent | 00d56bdf66a3aeaadbc84196aacbd8d4e698cf79 (diff) |
Merge Bundler 2.1.0.pre3 released version
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2674
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 |