summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-06 02:42:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-06 02:42:59 +0000
commit92089610b617fc07084d03f24a3e58a40639e5ce (patch)
treedb795679b1e94058e36db2bab29280c7747f220f /template
parent24e4104675272d3c8d9c9cc0f1b845e4015c3235 (diff)
fake.rb.in: override File::ALT_SEPARATOR
* template/fake.rb.in (File::ALT_SEPARATOR): override ALT_SEPARATOR if different, not only a backslash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r--template/fake.rb.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/template/fake.rb.in b/template/fake.rb.in
index c94eec3..50e1a49 100644
--- a/template/fake.rb.in
+++ b/template/fake.rb.in
@@ -15,10 +15,11 @@ class Object
RUBY_VERSION = "@RUBY_PROGRAM_VERSION@"
RUBY_DESCRIPTION = "ruby #{RUBY_VERSION} (@RUBY_RELEASE_DATE@) [#{RUBY_PLATFORM}]"
end
-if RUBY_PLATFORM =~ /mswin|bccwin|mingw/
- class File
+class File
+ sep = ("\\" if RUBY_PLATFORM =~ /mswin|bccwin|mingw/)
+ if sep != ALT_SEPARATOR
remove_const :ALT_SEPARATOR
- ALT_SEPARATOR = "\\"
+ ALT_SEPARATOR = sep
end
end