heist icon indicating copy to clipboard operation
heist copied to clipboard

number->string fails for Floats

Open byteit101 opened this issue 4 years ago • 0 comments

(number->string 1.2) fails by complaining that to_s expect 0 args, but 1 was given. This is because Ruby's Float#to_s doesn't support the radix arg, as Fixnum#to_s does. I have a partial fix in https://github.com/byteit101/heist/commit/d8b26ccefa3e9469303fe787cb3aea73fd18f2d7 that allows default base 10 to work for floats, but punts on the full float radix support.

byteit101 avatar Aug 20 '21 00:08 byteit101