Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Conversation

divec
Copy link

@divec divec commented Nov 20, 2013

Format negative zero as '-0' instead of as '0', as it does not behave
identically to positive zero. ((-0).toString() still returns '0' as
required by ES5 9.8.1.2).

Fixes #6548

@Nodejs-Jenkins
Copy link

Thank you for contributing this pull request! Here are a few pointers to make sure your submission will be considered for inclusion.

The following commiters were not found in the CLA:

  • David Chan

You can fix all these things without opening another issue.

Please see CONTRIBUTING.md for more information

@TooTallNate
Copy link

Seems good to me at first glance. You'll need to add a test, and sign the CLA.

@divec
Copy link
Author

divec commented Nov 20, 2013

Thanks, have signed the CLA

Format negative zero as '-0' instead of as '0', as it does not behave
identically to positive zero. ((-0).toString() still returns '0' as
required by ES5 9.8.1.2).

Fixes nodejs#6548
@TooTallNate
Copy link

@isaacs @tjfontaine et all. What do you guys think? Bug fix and hence v0.10 branch, or new functionality and hence master branch? I could see it going either way really.

@divec
Copy link
Author

divec commented Nov 20, 2013

I'd love to see it in v0.10, but I should point out that Chromium and Firebug format -0 as '0' so it's hard for me to claim that the existing behaviour is actually 'wrong' per se.

@skenqbx
Copy link

skenqbx commented Nov 25, 2013

@divec Since when can zero be negative?

@juliangruber
Copy link
Member

@rlidwka
Copy link

rlidwka commented Nov 25, 2013

Since when can zero be negative?

Since 1985.

@skenqbx
Copy link

skenqbx commented Nov 25, 2013

@juliangruber thx for clarification
@rlidwka gg

@TooTallNate
Copy link

So it looks like the Chromium guys are moving ahead with this one: https://codereview.chromium.org/82553008/

I'm kinda leaning towards master branch at this point, but not really for any particular reason.

@rlidwka
Copy link

rlidwka commented Nov 25, 2013

It is master branch. Although it's extremely unlikely that someone would depend on it, it's not a bugfix, and it changes behaviour of util module.

TooTallNate pushed a commit that referenced this pull request Nov 25, 2013
Format negative zero as '-0' instead of as '0', as it does not behave
identically to positive zero. ((-0).toString() still returns '0' as
required by ES5 9.8.1.2).

Fixes #6548.
Closes #6550.
@TooTallNate
Copy link

Thanks @divec. Landed in b3e4fc6 on master branch. Note that I had to update the email address on the commit to match the one you used to sign the CLA.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants