Skip to content

Instantly share code, notes, and snippets.

@rrouse
Created April 16, 2012 03:47
Show Gist options
  • Save rrouse/2396262 to your computer and use it in GitHub Desktop.
Save rrouse/2396262 to your computer and use it in GitHub Desktop.
def blah
"blah".nil? && "bleh".nil?
puts "hi"
else
puts "hello"
end
Calling blah prints hi and hello, but doesn't error. It warns in irb with (irb):6: warning: else without rescue is useless
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment