aboutsummaryrefslogtreecommitdiffstats
path: root/railties/CHANGELOG.md
diff options
context:
space:
mode:
authorCody Cutrer <cody@cutrer.us>2016-08-31 09:28:44 -0600
committerCody Cutrer <cody@instructure.com>2017-07-17 13:46:44 -0600
commited44b145bd6d621cd19a4a3c94eff1311e9c3755 (patch)
tree652eb7df106e28b88f1e42863890ca085c5ed417 /railties/CHANGELOG.md
parentc24be369322b9e0211fcef30003375de195ef660 (diff)
downloadrails-ed44b145bd6d621cd19a4a3c94eff1311e9c3755.tar.gz
rails-ed44b145bd6d621cd19a4a3c94eff1311e9c3755.tar.bz2
rails-ed44b145bd6d621cd19a4a3c94eff1311e9c3755.zip
support `-` as an argument to `rails runner`
in Rails 4.0, you could use `/dev/stdin` on both Linux and Mac, but with the switch to Kernel.load in Rails 4.1, this broke on Linux (you get a LoadError). Instead, explicitly detect `-` as meaning stdin, then read from stdin explicitly, instead of performing file gymnastics. This should now work on any platform uniformly. Passing a script via stdin is useful when you're sshing to a server, and the script you want to run is stored locally. You could theoretically pass the entire script on the command line, but in reality you'll run into problems with the command being too long.
Diffstat (limited to 'railties/CHANGELOG.md')
-rw-r--r--railties/CHANGELOG.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index f720b7caab..45e1f5f3ea 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -1,3 +1,8 @@
+* Support `-` as a platform-agnostic way to run a script from stdin with
+ `rails runner`
+
+ *Cody Cutrer*
+
* Add `bootsnap` to default `Gemfile`.
*Burke Libbey*