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

Add an explicit to_i on the ttl value #494

Merged
merged 1 commit into from Oct 12, 2014
Merged

Add an explicit to_i on the ttl value #494

merged 1 commit into from Oct 12, 2014

Conversation

petergoldstein
Copy link
Owner

With the introduction of Rails 4.2, the return value of expressions like 7.days has changed. In Rails 4.1.x and below, this is a Fixnum. In Rails 4.2 and up, it's an ActiveSupport::Duration.

JRuby does not handle converting this new type transparently to a Fixnum during the packing process. So to eliminate the conversion error we explicitly call to_i.

…n be an ActiveSupport::Duration value instead of a Fixnum.
petergoldstein added a commit that referenced this pull request Oct 12, 2014
@petergoldstein petergoldstein merged commit 13c4ab4 into petergoldstein:master Oct 12, 2014
@petergoldstein petergoldstein deleted the feature/explicit_to_i_on_ttl branch October 12, 2014 19:22
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.

None yet

1 participant