Closed bfoz closed 12 years ago
At the moment something like 3.meters * 4 works, but 3 * 4.meters doesn't. The bare 3 doesn't have the proper multiplication method to call, which results in dropping the units.
Use #coerce http://blog.rubybestpractices.com/posts/rklemme/019-Complete_Numeric_Class.html
At the moment something like 3.meters * 4 works, but 3 * 4.meters doesn't. The bare 3 doesn't have the proper multiplication method to call, which results in dropping the units.