-
-
Notifications
You must be signed in to change notification settings - Fork 909
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
Remove deprecation warning for Ruby 2.4 #1031
Conversation
@@ -548,7 +548,7 @@ def value_to_attribute_type(value) | |||
case value | |||
when true, false then :boolean | |||
when BigDecimal then :decimal | |||
when Fixnum then :fixnum | |||
when Integer then :integer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent when as deep as case.
@@ -538,7 +538,7 @@ def attribute_column | |||
|
|||
def column_type_to_attribute_type(type) | |||
case type | |||
when :integer, :float then :fixnum | |||
when :integer, :float then :integer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent when as deep as case.
@camelmasa Don't worry about it -- we'll close this when we've got it merged and link back to both of these PRs. :) |
ce6dbad
to
c288843
Compare
Thanks for this PR! We've merged this in 03a1d21 and gave you credit. |
Fixnum
andBignum
were unified toInteger
in Ruby 2.4.https://bugs.ruby-lang.org/issues/12005
I replaced type from
Fixnum
toInteger
.If my changes breaks legacy versions, We can add code like
if RUBY_VERSION <= "2.4.0"
for protectingshould-machers
gem's legacy versions.