summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-11 21:03:11 +0900
committergit <svn-admin@ruby-lang.org>2021-02-12 00:02:16 +0900
commitb83b27cddbd8b7147dfbfb3c00102da365e97760 (patch)
treebc44e055cd784598b6c3be1eafe21a6c5e6c39dd
parentaea40f44aa2918f5b64d2eab1720b3d63a8b2c98 (diff)
downloadruby-b83b27cddbd8b7147dfbfb3c00102da365e97760.tar.gz
[ruby/irb] Fix inverse separator condition
https://github.com/ruby/irb/commit/33f933196f
-rw-r--r--lib/irb/ext/loader.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/irb/ext/loader.rb b/lib/irb/ext/loader.rb
index 42df0ac6c7..af028996e7 100644
--- a/lib/irb/ext/loader.rb
+++ b/lib/irb/ext/loader.rb
@@ -38,11 +38,9 @@ module IRB # :nodoc:
else
separator =
if File::ALT_SEPARATOR
- File::SEPARATOR
+ "[#{Regexp.quote(File::SEPARATOR + File::ALT_SEPARATOR)}]"
else
- separators = File::SEPARATOR
- separators += File::ALT_SEPARATOR if File::ALT_SEPARATOR
- "[#{Regexp.quote(separators)}]"
+ File::SEPARATOR
end
ABSOLUTE_PATH_PATTERN = # :nodoc:
case Dir.pwd