<分区>
filename = ARGV.first
txt = open(filename)
puts "Here's your file #{filename}:"
print txt.read
print "Type the filename again: "
file_again = $stdin.gets.chomp
这是我的问题,如果我将它更改为 gets.chomp
它不起作用 为什么?
txt_again = open(file_again)
print txt_again.read
gets.chomp
和 $stdin.chomp
有什么区别