-
Notifications
You must be signed in to change notification settings - Fork 125
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
Replace Fixnum and Bignum with Integer #132
Conversation
Thanks for the PR, can you move the logic to a function and use |
Hey @sethpollack! Happy to move it to a method, but won't using |
I found the fix in rails, also I tested it and it works. |
Right, it works, but it still emits a deprecation warning. If you look at Rails master, you'll see they changed it to |
Ruby 2.4 deprecated the use of both Fixnum and Bignum, instead encouraging everyone to just use Integer, which is their superclass. So, we can replace all instances of the two deprecated classes with just Integer, silencing the warnings from this library when on Ruby 2.4.X. https://bugs.ruby-lang.org/issues/12005
Updated this to use |
Ok so lets go with |
Perfect thanks! |
Ok published the new version |
Awesome, thanks! |
@mcasper |
I can push up the changes, just wanted to hear your thoughts? |
Hmm, but don't we need to keep Fixnum and Bignum around so we don't break Ruby 2.3 and lower functionality? If we can remove Fixnum and Bignum functionality from the lower versions, then let's just remove all this checking and put Integer everywhere |
No in the lower versions
So I'm suggesting only using Integer and just changing the |
Ok, I pushed up the changes. |
Ohhh sorry, I see what you mean now. Looks great! |
Ruby 2.4 deprecated the use of both Fixnum and Bignum, instead
encouraging everyone to just use Integer, which is their superclass.
So, we can replace all instances of the two deprecated classes with just
Integer, silencing the warnings from this library when on Ruby 2.4.X.
It looks like this exact change has been opened twice, and then immediately closed out by the owners? Is there a reason for this?
https://bugs.ruby-lang.org/issues/12005