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 for bug #24 (implicit conversion to a string) #44

Merged
merged 1 commit into from
Apr 8, 2012
Merged

fix for bug #24 (implicit conversion to a string) #44

merged 1 commit into from
Apr 8, 2012

Conversation

rlidwka
Copy link
Contributor

@rlidwka rlidwka commented Apr 8, 2012

I wonder what javascript engine this module was developed for?

In V8 you can't assign a property to a string. That's why bug #24 appears with Node.js:

var x = new String("test");
x.prop = "hi";
// x == 'test'
// x.prop == 'hi'

x += 'test'
// x == 'testtest'
// x.prop == undefined

x.prop = 'hi'
// x.prop == undefined
// (it's a string now, not an object, it's immutable now)

@ashb
Copy link
Collaborator

ashb commented Apr 8, 2012

This was originally developed for a spidermonkey but I'm fairly sure the same rule applies there.

ashb added a commit that referenced this pull request Apr 8, 2012
fix for bug #24 (implicit conversion to a string)
@ashb ashb merged commit b23ef98 into evilstreak:master Apr 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants