ruby ARGV # can’t modify frozen string

appears that by default the command line parameters [ARGV] are frozen strings. go figure.

You can still do funky things with ARGV, though.

ARGV.map!{|name| name.dup} # now they’re not frozen

ARGV.shift

etc

etc.

One thought on “ruby ARGV # can’t modify frozen string

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>