diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-11-30 20:57:50 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-11-30 20:57:50 +0900 |
commit | 75607a67b4f5e3fb5acf9c49353f102a4ecd9319 (patch) | |
tree | 4dd142ddbb32b5350914f64c5fbe8b70b76f57cc /railties/lib/rails/commands/runner | |
parent | 0e97cd1a0d3e7dbe2b99eb111e005d7c9d7002b7 (diff) | |
download | rails-75607a67b4f5e3fb5acf9c49353f102a4ecd9319.tar.gz rails-75607a67b4f5e3fb5acf9c49353f102a4ecd9319.tar.bz2 rails-75607a67b4f5e3fb5acf9c49353f102a4ecd9319.zip |
use `Gem.win_platform?` to check windows Ruby platforms
`Gem.win_platform?` check if it is Windows more accurately.
Ref: https://github.com/ruby/ruby/blob/ruby_2_2/lib/rubygems.rb#L945..L952
Diffstat (limited to 'railties/lib/rails/commands/runner')
-rw-r--r-- | railties/lib/rails/commands/runner/USAGE | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/runner/USAGE b/railties/lib/rails/commands/runner/USAGE index dc47a35ff3..b2a6e8493d 100644 --- a/railties/lib/rails/commands/runner/USAGE +++ b/railties/lib/rails/commands/runner/USAGE @@ -8,7 +8,7 @@ Run the Ruby file located at `path/to/filename.rb` after loading the app: <%= executable %> path/to/filename.rb -<% if RbConfig::CONFIG['host_os'] !~ /mswin|mingw/ %> +<% unless Gem.win_platform? %> You can also use the runner command as a shebang line for your executables: #!/usr/bin/env <%= File.expand_path(executable) %> |