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 console util to support negative zero #960

Merged
merged 1 commit into from
Jun 5, 2018

Conversation

kenrick95
Copy link
Contributor

Fixes #952

The bug is caused by using String(value) function, which per the spec calls ToString(value). ToString(value) for number as per defined at the spec states that

Number m to String format as follows:
2. If m is +0 or −0, return the String "0".

So, this PR adds the case where if we meet negative zero at formatOutput, then return -0, else call String(input). Also, more tests are added.

Copy link

@schalkneethling schalkneethling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @kenrick95 r+

@schalkneethling schalkneethling added bug Indicates an unexpected problem or unintended behavior. community labels Jun 5, 2018
@schalkneethling schalkneethling added this to the Sprint 4 Q2 2018 milestone Jun 5, 2018
@schalkneethling schalkneethling merged commit b9fc24c into mdn:master Jun 5, 2018
@goodwin64
Copy link

👍

wbamberg pushed a commit to wbamberg/interactive-examples that referenced this pull request Jun 8, 2018
* upstream/master:
  adding oblique plus angle option to font-style example (mdn#963)
  fix(tabbed-editor): Apply output class to output container (mdn#961)
  Add rt example. (mdn#957)
  chore(deps): update dependency prettier to v1.13.4 (mdn#953)
  chore(deps): update dependency all-contributors-cli to v4.11.2 (mdn#954)
  chore(deps): update dependency jest to v23.1.0 (mdn#955)
  Fix console util to support negative zero (mdn#960)
  Add rp example. (mdn#945)
  Bug 1462897 - Directly use Math.round in the demo code. (mdn#956)
  chore(docs): update README with maintainers and good first issues (mdn#934)
  Implemented example for <figcaption> tag (mdn#941)
  Font variation settings (mdn#948)
  Fix font optical sizing (mdn#947)
  chore(deps): update dependency jest to v23 (mdn#944)
  chore(deps): update dependency prettier to v1.13.0 (mdn#950)
  chore(community): add @elharony as contributor (mdn#951)
  Add object-keys.html (mdn#937)
wbamberg pushed a commit to sheeeng/interactive-examples that referenced this pull request Jun 8, 2018
* upstream/master:
  Add one-value example for place-content (mdn#966)
  Add height to rtc example (mdn#970)
  Issue#693 add sizing util classes tabbed editor (mdn#962)
  Add rtc example. (mdn#958)
  Issue#837 html entity workaround (mdn#965)
  adding oblique plus angle option to font-style example (mdn#963)
  fix(tabbed-editor): Apply output class to output container (mdn#961)
  Add rt example. (mdn#957)
  chore(deps): update dependency prettier to v1.13.4 (mdn#953)
  chore(deps): update dependency all-contributors-cli to v4.11.2 (mdn#954)
  chore(deps): update dependency jest to v23.1.0 (mdn#955)
  Fix console util to support negative zero (mdn#960)
wbamberg pushed a commit to a2sheppy/interactive-examples that referenced this pull request Jun 16, 2018
* upstream/master: (55 commits)
  Issue#223 small tweaks to tabbed editor heights (mdn#972)
  fix(editor): change height of tabbed-taller (mdn#971)
  fix(performance): send loadEventEnd to parent via postMessage (mdn#967)
  chore(deps): update dependency all-contributors-cli to v5 (mdn#969)
  chore(deps): update dependency prettier to v1.13.5 (mdn#968)
  chore(deps): update dependency puppeteer to v1.5.0 (mdn#964)
  Add ruby example. (mdn#959)
  Add one-value example for place-content (mdn#966)
  Add height to rtc example (mdn#970)
  Issue#693 add sizing util classes tabbed editor (mdn#962)
  Add rtc example. (mdn#958)
  Issue#837 html entity workaround (mdn#965)
  adding oblique plus angle option to font-style example (mdn#963)
  fix(tabbed-editor): Apply output class to output container (mdn#961)
  Add rt example. (mdn#957)
  chore(deps): update dependency prettier to v1.13.4 (mdn#953)
  chore(deps): update dependency all-contributors-cli to v4.11.2 (mdn#954)
  chore(deps): update dependency jest to v23.1.0 (mdn#955)
  Fix console util to support negative zero (mdn#960)
  Add rp example. (mdn#945)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants