Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Negative Float Type Data Parsing #526

Closed
Alexius-Huang opened this issue Nov 18, 2017 · 2 comments · Fixed by #569
Closed

Fix Negative Float Type Data Parsing #526

Alexius-Huang opened this issue Nov 18, 2017 · 2 comments · Fixed by #569

Comments

@Alexius-Huang
Copy link
Member

As described from PR #470, float parsing cases below are normal:

(3.14159265358979).to_d.to_s # => "3.14159265358979"
(-273.150000000).to_d.to_s # => "-273.15"

# and without the round bracket
3.14159265358979.to_d.to_s # => "3.14159265358979"

However, there is a case when a negative valued float type number cannot call method without round bracket

-273.150000000.to_d.to_s # ERROR
@st0012
Copy link
Member

st0012 commented Nov 22, 2017

This issue blocks #379

@st0012 st0012 added this to the version 0.1.7 milestone Dec 22, 2017
@st0012 st0012 mentioned this issue Dec 27, 2017
@hachi8833
Copy link
Member

hachi8833 commented Dec 29, 2017

I fixed the issue locally and would send the PR tomorrow. Wait a bit.

Before that, I'd create the following issue to close together after that:

  • current compiler contains unused Incr = "++" and Decr = "--"
  • handling positive sign: +1

Well, I found that Ruby treats +++++1 as 1, and --1 or ----1 as 1, and ---1 as -1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants