lib/cc/analyzer/measurement_validations/name_validation.rb in codeclimate-0.84.0 vs lib/cc/analyzer/measurement_validations/name_validation.rb in codeclimate-0.85.0

- old
+ new

@@ -3,10 +3,10 @@ module MeasurementValidations class NameValidation < Validation REGEX = /^[A-Za-z0-9_\.\-]+$/ def valid? - name && name.is_a?(String) && REGEX.match?(name) + name&.is_a?(String) && REGEX.match?(name) end def message "Name must be present and contain only letters, numbers, periods, hyphens, and underscores" end