Skip to content

Commit

Permalink
Use correct RUBY_PLATFORM regex for Windows env [#4385 state:resolved]
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
anildigital authored and jeremy committed Apr 13, 2010
1 parent 8116a2b commit 518891f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion actionpack/test/controller/layout_test.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion railties/guides/source/initialization.textile
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion railties/lib/rails/engine.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion railties/lib/rails/generators/rails/app/app_generator.rb
Expand Up @@ -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 = {})
Expand Down
2 changes: 1 addition & 1 deletion railties/lib/rails/test_unit/testing.rake
Expand Up @@ -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
Expand Down

0 comments on commit 518891f

Please sign in to comment.