Created
April 27, 2012 23:18
-
-
Save jeffmccune/2514237 to your computer and use it in GitHub Desktop.
Ruby, I'm surprised by you, OK? You're not bash.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[jeff@maynard] (feature/master/registry_key_purge_values)(dirty)[█▆▁]1.8.7 /vagrant/modules/registry | |
$ cat foo.rb | |
#! /bin/bash | |
# | |
echo bar | |
[jeff@maynard] (feature/master/registry_key_purge_values)(dirty)[█▆▁]1.8.7 /vagrant/modules/registry | |
$ ruby foo.rb | |
bar |
slippycheeze
commented
Apr 28, 2012
Right, but marking the file as executable and letting the system start the interpreter process is different than using the shell and passing the script directly to ruby:
Notice I do ruby foo.rb
and not ./foo.rb
The syntax checking command for a ruby file is something like: ruby -W1 -c foo.rb
Ah. Yes, so I see. How precious.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment