veganstraightedge / new_base_60

Handy Conversion Sexagesimal (base 60) for Short URLs
http://tantek.pbworks.com/NewBase60
19 stars 6 forks source link

Fixnum 0 converts to null string #7

Open haiitch opened 7 years ago

haiitch commented 7 years ago

This doesn't seem to be expected behaviour, is it?

irb(main):004:0> z = NewBase60.new("0")
=> #<NewBase60:0x000000026233b8 @base_60="0">
irb(main):005:0> z.to_i
=> 0
irb(main):006:0> 0.to_sxg
=> ""
veganstraightedge commented 7 years ago

Probably not, huh?

Wanna take a crack and fixing it and submitting a pull request, @vruz?

haiitch commented 7 years ago

Definitely. At first I wasn't 100% sure what was the expected behaviour, but on hindsight it seems obvious from the inconsistency.

On 2 January 2017 at 16:13, Shane Becker notifications@github.com wrote:

Probably not, huh?

Wanna take a crack and fixing it and submitting a pull request, @vruz https://github.com/vruz?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/veganstraightedge/new_base_60/issues/7#issuecomment-270010021, or mute the thread https://github.com/notifications/unsubscribe-auth/AABboiC_JJba6ttBOVupOkIsJ-PXS_Swks5rOUxIgaJpZM4LYzrU .