I\'m using gets
to pause my script\'s output until the user hits the enter key. If I don\'t pass any arguments to my script then it works fine. However, if I
The whole point of Kernel#gets
is to treat the arguments passed to the program as filenames and read those files. The very first sentence in the documentation reads:
Returns (and assigns to $_) the next line from the list of files in ARGV (or $*)
That's just how gets
works. If you want to read from a specific IO
object (say, $stdin
), just call gets
on that object.