Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #18718 from jgeiger/fix_ruby_2_2_comparable_warnings

Fix ruby 2.2 comparable warnings
  • Loading branch information...
commit b344986bc3d94ca7821fc5e0eef1874882ac6cbb 2 parents 37f2def + abce1aa
@rafaelfranca rafaelfranca authored
View
2  activerecord/lib/active_record/fixtures.rb
@@ -589,7 +589,7 @@ def table_rows
# interpolate the fixture label
row.each do |key, value|
- row[key] = label if value == "$LABEL"
+ row[key] = label if value.is_a?(String) && value == "$LABEL"
end
# generate a primary key if necessary
View
1  activesupport/lib/active_support/values/time_zone.rb
@@ -223,6 +223,7 @@ def formatted_offset(colon=true, alternate_utc_string = nil)
# Compare this time zone to the parameter. The two are compared first on
# their offsets, and then by name.
def <=>(zone)
+ return unless zone.respond_to?(:utc_offset) && zone.respond_to?(:name)
result = (utc_offset <=> zone.utc_offset)
result = (name <=> zone.name) if result == 0
result
Please sign in to comment.
Something went wrong with that request. Please try again.