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

Don't use Fixnum and Bignum in Ruby 2.4 #73

Merged
merged 2 commits into from Jan 19, 2017

Conversation

k0kubun
Copy link
Contributor

@k0kubun k0kubun commented Jan 19, 2017

https://bugs.ruby-lang.org/issues/12739

I got following warnings.

/usr/share/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/the_garage-2.3.2/lib/garage/representer.rb:175: warning: constant ::Fixnum is deprecated
/usr/share/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/the_garage-2.3.2/lib/garage/representer.rb:174: warning: constant ::Bignum is deprecated

This patch fixes them in the same way as rails/rails#26732.

FalseClass,
Symbol,
]
PRIMITIVE_CLASSES.push(Fixnum, Bignum) unless 0.class == Integer
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is necessary.
0.is_a?(Integer) is true in any supported Ruby versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed fcf21fe

@k0kubun k0kubun merged commit 8ef010e into cookpad:master Jan 19, 2017
@k0kubun k0kubun deleted the integer-unification branch January 19, 2017 05:57
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

3 participants