What does the fail keyword do in Ruby?

前端 未结 4 1322
南旧
南旧 2020-12-13 16:52

I am learning Ruby and encountered the fail keyword. What does it mean?

if password.length < 8
   fail \"Password too short\"
end
unless  use         


        
4条回答
  •  渐次进展
    2020-12-13 17:32

    www.ruby-doc.org is your friend. When I googled rubydoc fail "Kernel" was the first hit. My advice is, when in doubt, go to the definitive source for definitional stuff like this.

提交回复
热议问题