lib/quantify/unit/base_unit.rb in quantify-2.0.2 vs lib/quantify/unit/base_unit.rb in quantify-3.0.0

- old
+ new

@@ -415,9 +415,10 @@ return true if valid_descriptors? && valid_dimensions? raise Exceptions::InvalidArgumentError, "Unit definition must include a name, a symbol, a label and physical quantity" end def valid_descriptors? + return true if is_dimensionless? [:name, :symbol, :label].all? do |attr| attribute = send(attr) attribute.is_a?(String) && !attribute.empty? end end