Skip to content
This repository
Browse code

Make RUBY_PLATFORM windows regex consistent [#4345 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit b9b9f9ee15e2282e9c765d86cb8b6120e2bdb1b9 1 parent 3eda7cf
Anil Wadghule authored April 08, 2010 josevalim committed April 12, 2010

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  railties/lib/rails/commands/runner.rb
2  railties/lib/rails/commands/runner.rb
@@ -18,7 +18,7 @@
18 18
   opts.on("-h", "--help",
19 19
           "Show this help message.") { $stderr.puts opts; exit }
20 20
 
21  
-  if RUBY_PLATFORM !~ /mswin/
  21
+  if RUBY_PLATFORM !~ /(:?mswin|mingw)/
22 22
     opts.separator ""
23 23
     opts.separator "You can also use runner as a shebang line for your scripts like this:"
24 24
     opts.separator "-------------------------------------------------------------"

0 notes on commit b9b9f9e

Patrik Wenger

Shouldn't it be /(?:mswin|mingw)/ or just /mswin|mingw/ ?

Xavier Noria

yeah, the latter is better, grouping is superfluous in that regexp

Please sign in to comment.
Something went wrong with that request. Please try again.