summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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