Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
$ irb
irb(main):001:0> require 'active_support/all'
=> true
irb(main):002:0> class Integer
irb(main):003:1> def fact
irb(main):004:2> (1..self).reduce(:*) || 1
irb(main):005:2> end
irb(main):006:1> end
=> nil
irb(main):007:0> 10.fact == 6.weeks
=> true
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.