# File lib/facet/kernel/maybe.rb, line 10 def maybe(chance = 0.5, &block) if block then yield if rand < chance else rand < chance end end