From: "Jesús Gabriel y Galán" Date: 2013-02-14T00:32:19+09:00 Subject: Re: Ruby command line options s and S On Wed, Feb 13, 2013 at 3:59 PM, Love U Ruby wrote: > Can anyone help me to understand the difference between s and S with > small snippets? -S tells Ruby to look into the $PATH variable when searching for the script you want to run. For example, say you have a test.rb in /home/user/bin/test.rb and $PATH includes that folder. You could call ruby -S test.rb from anywhere and Ruby will get test.rb from /home/user/bin -s tells Ruby to treat switches after the script name in a special way. They are removed from ARGV and used to create and set a value for global variables with that name. For example: $ cat test.rb puts "variable is: #{$abc}" $ ruby -s test.rb -abc=35 variable is: 35 Jesus.