Skip to content

Instantly share code, notes, and snippets.

@sferik sferik/and_or.rb
Last active Dec 31, 2015

Embed
What would you like to do?
class BasicObject
def &&(other)
other
end
def ||(other)
self
end
end
class NilClass
def &&(other)
self
end
def ||(other)
other
end
end
class FalseClass
def &&(other)
self
end
def ||(other)
other
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.