Permalink
Browse files

Use correct RUBY_PLATFORM regex for Windows env [#4385 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
1 parent 8116a2b commit 518891f4907c9967cad22552eac110e81a0d44c0 @anildigital anildigital committed with jeremy Apr 13, 2010
View
2 actionpack/test/controller/layout_test.rb
@@ -209,7 +209,7 @@ def test_layout_status_is_rendered
end
end
-unless RUBY_PLATFORM =~ /(:?mswin|mingw|bccwin)/
+unless RUBY_PLATFORM =~ /mswin|mingw/
class LayoutSymlinkedTest < LayoutTest
layout "symlinked/symlinked_layout"
end
View
2 railties/guides/source/initialization.textile
@@ -2636,7 +2636,7 @@ The method +find_with_root_flag+ is defined on +Rails::Engine+ (the superclass o
root = File.exist?("#{root_path}/#{flag}") ? root_path : default
raise "Could not find root path for #{self}" unless root
- RUBY_PLATFORM =~ /(:?mswin|mingw)/ ?
+ RUBY_PLATFORM =~ /mswin|mingw/ ?
Pathname.new(root).expand_path : Pathname.new(root).realpath
end
</ruby>
View
2 railties/lib/rails/engine.rb
@@ -119,7 +119,7 @@ def find_root_with_flag(flag, default=nil)
root = File.exist?("#{root_path}/#{flag}") ? root_path : default
raise "Could not find root path for #{self}" unless root
- RUBY_PLATFORM =~ /(:?mswin|mingw)/ ?
+ RUBY_PLATFORM =~ /mswin|mingw/ ?
Pathname.new(root).expand_path : Pathname.new(root).realpath
end
end
View
2 railties/lib/rails/generators/rails/app/app_generator.rb
@@ -265,7 +265,7 @@ def mysql_socket
"/opt/local/var/run/mysql4/mysqld.sock", # mac + darwinports + mysql4
"/opt/local/var/run/mysql5/mysqld.sock", # mac + darwinports + mysql5
"/opt/lampp/var/mysql/mysql.sock" # xampp for linux
- ].find { |f| File.exist?(f) } unless RUBY_PLATFORM =~ /(:?mswin|mingw)/
+ ].find { |f| File.exist?(f) } unless RUBY_PLATFORM =~ /mswin|mingw/
end
def empty_directory_with_gitkeep(destination, config = {})
View
2 railties/lib/rails/test_unit/testing.rake
@@ -30,7 +30,7 @@ end
module Kernel
def silence_stderr
old_stderr = STDERR.dup
- STDERR.reopen(RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'NUL:' : '/dev/null')
+ STDERR.reopen(RUBY_PLATFORM =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')
STDERR.sync = true
yield
ensure

0 comments on commit 518891f

Please sign in to comment.