Permalink
Browse files

Merge pull request #18718 from jgeiger/fix_ruby_2_2_comparable_warnings

Fix ruby 2.2 comparable warnings
  • Loading branch information...
2 parents 37f2def + abce1aa commit b344986bc3d94ca7821fc5e0eef1874882ac6cbb @rafaelfranca rafaelfranca committed Jan 29, 2015
@@ -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
@@ -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

0 comments on commit b344986

Please sign in to comment.