Re: issue with uninitialized constant ARG (NameError)



Tuka Opaleye wrote:
C:\Data\Projects\Ruby\tests>ruby StringTest.rb source.csv
StringTest.rb:12: uninitialized constant ARG (NameError)
[...]
StringTest.rb contains:

# the first commandline argument is the source file
# the 2nd argument is the target file

puts ARGV[0]
puts ARGV[1]

#Get the arguments and assign as files
sourceFilename = ARGV[0]
targetFilename = ARGV[1]

Did you copy and paste that? Because the error message complains about ARG,
but there's only ARG*V* in the code - which doesn't make any sense...


--
Jabber: sepp2k@xxxxxxxxxx
ICQ: 205544826

.



Relevant Pages


Loading