stdin.rb(io)
The line of Ruby code $stdin.read
reads input from the standard input (keyboard) until the end of the file (EOF) is reached, and stores the input as a string.
Execution:
# $stdin.read
#=> nil
Executed with Ruby 3.3.6
The line of Ruby code $stdin.read
reads input from the standard input (keyboard) until the end of the file (EOF) is reached, and stores the input as a string.
# $stdin.read
#=> nil
Executed with Ruby 3.3.6