From: Matthew Kerwin Date: 2013-05-09T06:17:17+09:00 Subject: Re: Problem with FileUtils move command. --047d7b343bb4432e5604dc3b7550 Content-Type: text/plain; charset=ISO-8859-1 On May 9, 2013 2:51 AM, "Daniel Stephens" wrote: > > Maybe it's not in [0]?? Drop that loop at the top of your script as well and lets see what we get. > > ARGV.each do |arg| > puts "Argument: #{arg}" > end Pro tip: When debugging vars that may be nil, use #p instead of #puts. You get much more useful output, e.g.: p ARGV[0] #=> nil p ARGV #=> [] Sent from my phone, so excuse the typos. --047d7b343bb4432e5604dc3b7550 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


On May 9, 2013 2:51 AM, "Daniel Stephens" <danny.a.stephens@gmail.com> wrote:
>
> Maybe it's not in [0]?? Drop that loop at the top of your script a= s well and lets see what we get.
>
> ARGV.each do |arg|
> =A0=A0puts "Argument: #{arg}"
> end

Pro tip: When debugging vars that may be nil, use #p instead of #puts. Y= ou get much more useful output, e.g.:

=A0=A0=A0 p ARGV[0] #=3D> nil
=A0=A0=A0 p ARGV #=3D> []

Sent from my phone, so excuse the typos.

--047d7b343bb4432e5604dc3b7550--