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

Comments

Projects
None yet
3 participants
@askucher
Copy link

askucher commented Jul 31, 2014

Got from documentation

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

Actually result is

{name: 'john'}
@vendethiel

This comment has been minimized.

Copy link
Contributor

vendethiel commented Jul 31, 2014

Please search for older issues first (hasOwnPrperty etc)

@vendethiel vendethiel closed this Jul 31, 2014

@askucher

This comment has been minimized.

Copy link

askucher commented Jul 31, 2014

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

@askucher

This comment has been minimized.

Copy link

askucher commented Jul 31, 2014

Ah. found solution

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

This comment has been minimized.

Copy link
Contributor

vendethiel commented Jul 31, 2014

@robotlolita

This comment has been minimized.

Copy link
Contributor

robotlolita commented Aug 1, 2014

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

@vendethiel

This comment has been minimized.

Copy link
Contributor

vendethiel commented Aug 1, 2014

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