olbrich / ruby-units

A unit handling library for ruby
MIT License
527 stars 109 forks source link

Handling of Redundant Units and Non-space Separators #122

Open sshaw opened 9 years ago

sshaw commented 9 years ago

Feature or bug?

irb [2.1.3] (ruby-units)$ Unit("1lbs ,,,,,,, 5oz")
=> 21/16 lbs
irb [2.1.3] (ruby-units)$ Unit("1 lbslbs 5 oz")
=> 21/16 lbs
kshahkshah commented 7 years ago

Since the library isn't designed to parse arbitrary strings looking for units, this isn't a bug. Whether it's a feature though :)

olbrich commented 7 years ago

Actually, I consider that to be a bug