tonumber fails to convert float numbers without decimal point
Tonumber does not convert float numbers like "3e6" and gives back nil. Proposed modification tries to convert to integer first and if failing to float.
@meetmauro Thanks for your contribution, could you add a tests to _glua-tests/issues.lua ?
Hi @yuin
I tried adding the test to the issues.lua but that is in turn failing in other places when I run it with glua to test it...
./glua _glua-tests/issues.lua
gives
issues.lua line:174(column:18) near '(': ambiguous syntax (function call x new statement)
not sure how to proceed... Is this the right way to run the lua tests?
@meetmauro You can run tests by make test . See CONTRIBUTING.md