Skip to content

Commit c04e0c4

Browse files
committed
Convert differ to use object_is_any_of? and fix regression
1 parent 697f1a4 commit c04e0c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/octocatalog-diff/catalog-diff/differ.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
require_relative '../catalog'
1010
require_relative '../errors'
11+
require_relative '../util/util'
1112
require_relative 'filter'
1213

1314
module OctocatalogDiff
@@ -530,7 +531,8 @@ def hashdiff_initial(catalog1_in, catalog2_in)
530531

531532
# Added a new key that points to some kind of data structure that we know how
532533
# to handle.
533-
if obj[1] =~ /^(.+)\f([^\f]+)$/ && [String, Integer, Float, TrueClass, FalseClass, Array, Hash].include?(obj[2].class)
534+
classes = [String, Fixnum, Integer, Float, TrueClass, FalseClass, Array, Hash]
535+
if obj[1] =~ /^(.+)\f([^\f]+)$/ && OctocatalogDiff::Util::Util.object_is_any_of?(obj[2], classes)
534536
hashdiff_add_remove.add(obj[1])
535537
next
536538
end

0 commit comments

Comments
 (0)