I/O exercises (Guessing Game)

Hello! After struggling with the shuffle file portion of the exercise, I looked at the solution code as listed below:

def shuffle_file(filename)
base = File.basename(filename, “.*”)
extension = File.extname(filename)
File.open("#{base}-shuffled#{extension}", “w”) do |f|
File.readlines(filename).shuffle.each do |line|
f.puts line.chomp
end
end
end

if FILE == $PROGRAM_NAME

puts ARGV

if ARGV.length == 1
shuffle_file(ARGV.shift)
else
puts “ENTER FILENAME TO SHUFFLE:”
filename = gets.chomp
shuffle_file(filename)
end
end

Specifically, I’m confused as to how ARGV is being used. If i were to uncomment out (puts ARGV), am I supposed to be seeing a list of files in the terminal? When uncommented, I get nothing.
As the code is currently constructed, when I run ‘ruby file_name’ in the terminal, I automatically enter the ELSE statement prompting the user to enter a filename. Any help is appreciated!