Skip to content

Instantly share code, notes, and snippets.

Created October 13, 2016 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/9fae4daa71acf7d9320929778fb9dd1c to your computer and use it in GitHub Desktop.
Save anonymous/9fae4daa71acf7d9320929778fb9dd1c to your computer and use it in GitHub Desktop.
$ cat argtest.rb
my_str = String.new
ARGV.each { |r| my_str.concat("#{r} ") }
p my_str
puts my_str
$ ruby argtest.rb a "b c" d
"a b c d "
a b c d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment