lib/kind/objects/not_nil.rb in kind-5.2.0 vs lib/kind/objects/not_nil.rb in kind-5.3.0
- old
+ new
@@ -1,13 +1,9 @@
# frozen_string_literal: true
module Kind
module NotNil
def self.[](value, label: nil)
- return value unless value.nil?
-
- label_text = label ? "#{label}: " : ''
-
- raise Error.new("#{label_text}expected to not be nil")
+ STRICT.not_nil(value, label)
end
end
end