Commit graph

4 commits

Author SHA1 Message Date
Steve Huff
4a5218a8af Reworked number-handling logic
No more coercing to String and regex matching.  Instead, we now coerce
to Integer at the beginning or raise an error if we cannot coerce to
Integer.

A consequence of this change is that the function will now accept
blatantly non-numeric strings as input, and return false.  This seems a
bit goofy to me, but it's how String#to_i works.  If we really don't
like this, then I'm open to suggestions.
2013-03-29 12:54:37 -04:00
Steve Huff
e6916f83fd Enable num2bool to accept numeric input
Also ignore rspec fixtures directory
2013-03-29 12:53:56 -04:00
Ken Barber
19313b43ea (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
Ken Barber
99a93d366f Convert to module format. 2011-04-30 15:59:31 +02:00
Renamed from num2bool.rb (Browse further)