Skip to content

Instantly share code, notes, and snippets.

@deep-spaced
Created December 15, 2015 03:03
Show Gist options
  • Save deep-spaced/67514d6654b86dab58cf to your computer and use it in GitHub Desktop.
Save deep-spaced/67514d6654b86dab58cf to your computer and use it in GitHub Desktop.
# &&
puts "test".is_a?(String) && 54+33 # => 87
puts "test".is_a?(String) && true # => true
puts 54+33 && "test".is_a?(String) # => true
puts true && "test".is_a?(Integer) # => false
puts "test".is_a?(Integer) && true # => false
# ||
puts "true" || "test".is_a?(String) # => "true"
puts "true".size == 12 || "test".is_a?(String) # => true
puts "true".size == 12 || "test".is_a?(Integer) # => false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment