Skip to content

Implement Time#clone#4174

Merged
bcardiff merged 2 commits intocrystal-lang:masterfrom
Sija:add-time-clone
Mar 23, 2017
Merged

Implement Time#clone#4174
bcardiff merged 2 commits intocrystal-lang:masterfrom
Sija:add-time-clone

Conversation

@Sija
Copy link
Contributor

@Sija Sija commented Mar 22, 2017

ATM you can't #clone any Tuple or NamedTuple including Time instance.
This PR adds #clone method to Time (calls #dup internally).

Copy link
Member

@bcardiff bcardiff left a comment

Choose a reason for hiding this comment

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

(see comment inline)

In a more general case, this happen for all structs that does not have clone, yet I don't see a problem to allow clone by default on structs. But we can discuss address/discuss that in other PR/issue.

@bcardiff
Copy link
Member

@Sija I just realized that my inline comment was never sent. I made a little change. After that we should be able to merge it.

@bcardiff bcardiff added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib labels Mar 23, 2017
@bcardiff bcardiff added this to the Next milestone Mar 23, 2017
@bcardiff bcardiff merged commit 204c94c into crystal-lang:master Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants