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

The infix with (aka the cloneport) issue #534

Closed
askucher opened this issue Jul 31, 2014 · 6 comments
Closed

The infix with (aka the cloneport) issue #534

askucher opened this issue Jul 31, 2014 · 6 comments

Comments

@askucher
Copy link

Got from documentation

girl = {name: \hanna, age: 22}
guy  = girl with name: \john
guy  #=> {name: 'john',  age: 22}

Actually result is

{name: 'john'}
@vendethiel
Copy link
Contributor

Please search for older issues first (hasOwnPrperty etc)

@askucher
Copy link
Author

Thx for answer but it was not useful for me. I didn't find any issue using key hasOwnPrperty.

@askucher
Copy link
Author

Ah. found solution

girl = {name: \hanna, age: 22}
guy  = girl <<< name: \john
#=> {"name":"john","age":22}

@vendethiel
Copy link
Contributor

#153 #196 #201

@robotlolita
Copy link
Contributor

If this is not in the docs yet I can do a PR that explains better how with works.

@vendethiel
Copy link
Contributor

The docs say "Remember that the clone operator creates a prototypical clone, and prototypes are not serialized in JSON."

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

No branches or pull requests

3 participants