Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将如何重新考虑这样的事情?
response = "yes" if response == "yes" or response == "y" puts "Do Something" end
if %w(yes y).include?(response)
嗯,你可以像下面这样使用,我希望它对你有帮助
样本
如果@response == 'R' || @response == 'r'
如果你放OR那么它会告诉你一个错误