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
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def validate_inclusion_of(attr)
# @private
class ValidateInclusionOfMatcher < ValidationMatcher
ARBITRARY_OUTSIDE_STRING = 'shoulda-matchers test string'
ARBITRARY_OUTSIDE_FIXNUM = 123456789
ARBITRARY_OUTSIDE_INTEGER = 123456789
ARBITRARY_OUTSIDE_DECIMAL = BigDecimal.new('0.123456789')
ARBITRARY_OUTSIDE_DATE = Date.jd(9999999)
ARBITRARY_OUTSIDE_DATETIME = DateTime.jd(9999999)
Expand Down Expand Up @@ -483,8 +483,8 @@ def outside_values
case attribute_type
when :boolean
boolean_outside_values
when :fixnum
[ARBITRARY_OUTSIDE_FIXNUM]
when :integer
[ARBITRARY_OUTSIDE_INTEGER]
when :decimal
[ARBITRARY_OUTSIDE_DECIMAL]
when :date
Expand Down Expand Up @@ -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.

when :timestamp then :datetime
else type
end
Expand All @@ -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.

when Date then :date
when DateTime then :datetime
when Time then :time
Expand Down