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

Suppress Fixnum and Bignum warnings on Ruby 2.4. #907

Merged

Conversation

junaruga
Copy link
Contributor

@junaruga junaruga commented Nov 24, 2017

This PR would suppress Fixnum and Bignum warnings on Ruby 2.4 when running tests.

$ bundle exec rspec spec -f p
...
/home/jaruga/git/mysql2/spec/mysql2/client_spec.rb:977: warning: constant ::Fixnum is deprecated
...
/home/jaruga/git/mysql2/spec/mysql2/statement_spec.rb:423: warning: constant ::Bignum is deprecated
...

The 0.class hack is used in https://github.com/rails/rails .

@sodabrew
Copy link
Collaborator

Great hack! Thank you!

@sodabrew sodabrew merged commit 0e4fcc3 into brianmario:master Nov 25, 2017
@sodabrew sodabrew added this to the 0.5.0 milestone Nov 25, 2017
junaruga added a commit to junaruga/mysql2 that referenced this pull request Nov 27, 2017
@junaruga junaruga deleted the hotfix/suppress-fixnum-bignum-warnings branch November 29, 2017 13:06
@junaruga
Copy link
Contributor Author

Thanks for the merging!

koic added a commit to koic/mysql2 that referenced this pull request Feb 14, 2018
Follow up of brianmario#907.

Since `Fixnum` is a subclass of `Integer`, I thought it would be OK to
replace it with `Integer`. Especially, It will be a calm expression for
Ruby 2.4 or higher users.
koic added a commit to koic/mysql2 that referenced this pull request Feb 14, 2018
Follow up of brianmario#907.

Since `Fixnum` is a subclass of `Integer`, I thought it would be OK to
replace it with `Integer`. Especially, It will be a calm expression for
Ruby 2.4 or higher users.
sodabrew pushed a commit that referenced this pull request Feb 14, 2018
Follow up of #907.

Since `Fixnum` is a subclass of `Integer`, I thought it would be OK to
replace it with `Integer`. Especially, It will be a calm expression for
Ruby 2.4 or higher users.
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