As far as I can tell, ruby ββdoes not remove these double quotes from the command line. The shell uses them to interpolate the contents as a string and pass them along with ruby.
You can get everything that Ruby gets as follows:
cmd_line = "#{$0} #{ARGV.join( ' ' )}"
Why do you need to know what is in quotation marks? Can you use any other delimiter (e.g. ':' or '#')?
If you need, you can pass double quotes to ruby, escaping them:
$> ruby test.rb command "\"line\"" arguments
The above cmd_line variable will receive the following line in this case:
test.rb comand "line" arguments
source share