Skip to content

Commit

Permalink
Merge pull request #18718 from jgeiger/fix_ruby_2_2_comparable_warnings
Browse files Browse the repository at this point in the history
Fix ruby 2.2 comparable warnings
  • Loading branch information
rafaelfranca committed Jan 29, 2015
2 parents 37f2def + abce1aa commit b344986
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/fixtures.rb
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions activesupport/lib/active_support/values/time_zone.rb
Expand Up @@ -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
Expand Down

0 comments on commit b344986

Please sign in to comment.