lib/rbbt/util/misc/objects.rb in rbbt-util-5.13.16 vs lib/rbbt/util/misc/objects.rb in rbbt-util-5.13.17

- old
+ new

@@ -5,10 +5,10 @@ return entity unless String === entity or Array === entity options ||= {} dup_array = options.delete :dup_array - if Annotated === field or (Entity.respond_to?(:formats) and Entity.formats.include? field) + if Entity === field or (Entity.respond_to?(:formats) and Entity.formats.include? field) params = options.dup params[:format] ||= params.delete "format" params.merge!(:format => field) unless params.include?(:format) and not ((f = params[:format]).nil? or (String === f and f.empty?))