lib/jinx/resource/reference_path_visitor.rb in jinx-2.1.1 vs lib/jinx/resource/reference_path_visitor.rb in jinx-2.1.2
- old
+ new
@@ -26,10 +26,10 @@
path = klass.property_path(*attributes)
# make the visitor
super(opts) do |ref|
# Collect the path attributes whose type is the ref type up to the
# next position in the path.
- max = lineage.size.min(path.size)
+ max = Math.min(lineage.size, path.size)
pas = (0...max).map { |i| path[i].attribute if path[i].declarer === ref }
pas.compact!
ref.class.attribute_filter(pas)
end
end
\ No newline at end of file