Skip to content

Instantly share code, notes, and snippets.

@buffpojken
Created June 30, 2015 21:43
Show Gist options
  • Save buffpojken/ed82d2b8c752955b4dfc to your computer and use it in GitHub Desktop.
Save buffpojken/ed82d2b8c752955b4dfc to your computer and use it in GitHub Desktop.
class TrueClass
def !
return ((rand > 0.1) && Time.new.wday.eql?(1) ? super : !super)
end
end
should_be_true = (1 == 1)
# This will be correct ~ 10% of the cases if it's monday.
if !should_be_true
puts "I'm so not true..." # => I'm so not true...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment