diff options
author | aycabta <aycabta@gmail.com> | 2021-02-10 23:24:39 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-02-11 20:27:25 +0900 |
commit | d77a42fbfd60f4e4f49f1feb56e089494fbf3572 (patch) | |
tree | 314dcf0b391cdc2745dd74a83f79890e4355152d | |
parent | c3b2bb0969cc47dcfb1f624c94a46cdf1e2cc2ad (diff) | |
download | ruby-d77a42fbfd60f4e4f49f1feb56e089494fbf3572.tar.gz |
[ruby/irb] Suppress error when File::ALT_SEPARATOR is nil
https://github.com/ruby/irb/commit/96accf3b95
-rw-r--r-- | lib/irb/ext/loader.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/irb/ext/loader.rb b/lib/irb/ext/loader.rb index 90dcd70bd0..42df0ac6c7 100644 --- a/lib/irb/ext/loader.rb +++ b/lib/irb/ext/loader.rb @@ -40,7 +40,9 @@ module IRB # :nodoc: if File::ALT_SEPARATOR File::SEPARATOR else - "[#{Regexp.quote(File::SEPARATOR + File::ALT_SEPARATOR)}]" + separators = File::SEPARATOR + separators += File::ALT_SEPARATOR if File::ALT_SEPARATOR + "[#{Regexp.quote(separators)}]" end ABSOLUTE_PATH_PATTERN = # :nodoc: case Dir.pwd |