Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Ruby 2.4 compatibility (don't use Fixnum anymore) #2401

Merged
merged 4 commits into from
Jan 30, 2018

Conversation

ledermann
Copy link
Contributor

On Ruby 2.4.0, this PR avoids warnings like this:

/usr/local/rvm/gems/ruby-2.4.0/gems/paperclip-5.1.0/lib/paperclip/storage/fog.rb:184: warning: constant ::Fixnum is deprecated 

NEWS Outdated
@@ -18,6 +18,7 @@ master:
`CLASS=User rake paperclip:refresh:fingerprints`
You can optionally limit the attachment that will be processed, e.g:
`CLASS=User ATTACHMENT=avatar rake paperclip:refresh:fingerprints`
* Ruby 2.4.0 compatibility (doen't use Fixnum anymore)

Choose a reason for hiding this comment

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

don't or doesn't

@janko
Copy link
Contributor

janko commented May 4, 2017

Since Fixnum is a descendant from Integer, you can use is_a?(Integer) instead of is_a?(0.class).

@ledermann ledermann changed the title Ruby 2.4.0 compatibility (doen't use Fixnum anymore) Ruby 2.4.0 compatibility (don't use Fixnum anymore) Jan 25, 2018
@ledermann ledermann changed the title Ruby 2.4.0 compatibility (don't use Fixnum anymore) Ruby 2.4 compatibility (don't use Fixnum anymore) Jan 25, 2018
@sidraval sidraval merged commit 76575c9 into thoughtbot:master Jan 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants