ruby-units
ruby-units copied to clipboard
best_prefix produces invalid results
I stumbled upon the 'best_prefix' method when I was looking for something along the lines of #4. Trying to use it, though, I noticed it doesn't work for mass units:
t = Unit.new("2000 kg").best_prefix
=> 2 kkg
and
t = Unit.new("23000 mg").best_prefix
=> 23000 mg
I'm guessing has something to do with kg being SI base unit instead of g?!
Thanks, I'll look into it.