Humorous Moment
October 20th, 2006
I use the Money gem quite a bit in my Rails applications. One thing I needed was to often add or substract one penny from an amount. So, I did like all good programmers should do:
1 2 3 |
class Money Penny = Money.new(1).freeze end |
Turns out that when using the constant, it ends up looking like this:
amount -= Money::Penny |