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 regression introduced by 1.4.3, fixes #56 #57

Merged
merged 1 commit into from Mar 26, 2015

Conversation

Projects
None yet
4 participants
@latentflip
Contributor

latentflip commented Mar 26, 2015

It turns out, reusing argument names as variables is dangerous
if you then go on to use arguments.

Take this example:

function x (a) {
    a = 10;
    console.log(arguments);
}

x('foo');

One might think that this would print [ 'foo' ].
One would be wrong.

Fix regression introduced by 1.4.3, fixes #56
It turns out, reusing argument names as variables is dangerous
if you then go on to use `arguments`.

Take this example:

```js
function x (a) {
    a = 10;
    console.log(arguments);
}

x('foo');
```

One might think that this would print `[ 'foo' ]`.
One would be wrong.
@wraithgar

This comment has been minimized.

Show comment
Hide comment
@wraithgar

wraithgar Mar 26, 2015

Member

+1 computers

Member

wraithgar commented Mar 26, 2015

+1 computers

@lukekarrys

This comment has been minimized.

Show comment
Hide comment
@lukekarrys

lukekarrys Mar 26, 2015

Contributor

+1 visual

Contributor

lukekarrys commented Mar 26, 2015

+1 visual

latentflip added a commit that referenced this pull request Mar 26, 2015

Merge pull request #57 from AmpersandJS/fix-56
Fix regression introduced by 1.4.3, fixes #56

@latentflip latentflip merged commit 588639e into master Mar 26, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@latentflip latentflip deleted the fix-56 branch Mar 26, 2015

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