在这里看到的一段代码http://guides.ruby.tw/ruby/strings.html,guess.chop!有什么在这里是什么意思。没理解
# 把程式儲存為 guess.rb
words = ['foobar', 'baz', 'quux']
secret = words[rand(3)]
print "guess?"
while guess = STDIN.gets
#这个chop!是什么意思
guess.chop!
if guess == secret
puts "You win!"
break
else
puts "Sorry, you lose."
end
print "guess?"
end
puts "The word was " + secret + "."