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 64-bit tagged pointer issue. #2

Closed
wants to merge 1 commit into from
Closed

Fix 64-bit tagged pointer issue. #2

wants to merge 1 commit into from

Conversation

devxoul
Copy link
Contributor

@devxoul devxoul commented May 15, 2014

@nubbel
Copy link
Owner

nubbel commented May 15, 2014

Thank you @devxoul!
I'm afraid I cannot merge your changes, because the date components would be shared across all (SexyDates-)NSNumber instances.
Consider this case:

NSNumber *oneWeek = @(1).week;
NSNumber *fourMonths = @(4).months;    
NSDate *oneWeekAgo    = oneWeek.ago;
NSDate *fourMonthsAgo = fourMonths.ago;
NSLog(@"dates: %@", NSDictionaryOfVariableBindings(oneWeekAgo, fourMonthsAgo));

Output:

dates: {
    fourMonthsAgo = "2014-01-08 12:51:07 +0000";
    oneWeekAgo = "2014-01-08 12:51:07 +0000";
}

Note that oneWeekAgo and fourMonthsAgo result in the exact same date which is one week and four months ago. This is kind of unexpected behavior, isn't it?

@devxoul
Copy link
Contributor Author

devxoul commented May 15, 2014

I didn't test enough. Sorry. I just re-sent pull request.

@devxoul devxoul closed this May 15, 2014
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