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

Remove deprecation warning for Ruby 2.4 #1031

Closed
wants to merge 1 commit into from

Conversation

camelmasa
Copy link

@camelmasa camelmasa commented Jul 11, 2017

Fixnum and Bignum were unified to Integer in Ruby 2.4.
https://bugs.ruby-lang.org/issues/12005

I replaced type fromFixnum to Integer.

If my changes breaks legacy versions, We can add code like if RUBY_VERSION <= "2.4.0" for protecting should-machers gem's legacy versions.

@@ -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

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

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
Copy link
Author

@mcmire Should I close this PR ❓ This PR is duplicated #1040.

@guialbuk guialbuk added this to the v4.0 milestone Jul 31, 2017
@guialbuk guialbuk changed the base branch from master to rails-5 July 31, 2017 18:53
@mcmire
Copy link
Collaborator

mcmire commented Jul 31, 2017

@camelmasa Don't worry about it -- we'll close this when we've got it merged and link back to both of these PRs. :)

@mcmire mcmire force-pushed the rails-5 branch 2 times, most recently from ce6dbad to c288843 Compare September 17, 2017 23:28
@mcmire
Copy link
Collaborator

mcmire commented Oct 3, 2017

Thanks for this PR! We've merged this in 03a1d21 and gave you credit.

@mcmire mcmire closed this Oct 3, 2017
@camelmasa camelmasa deleted the ruby-2.4 branch October 4, 2017 09:02
@camelmasa
Copy link
Author

@mcmire Thanks for fixing ! I confirmed my credit 😉 03a1d21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants