lib/option.rb in option-1.0.1 vs lib/option.rb in option-1.1.0

- old
+ new

@@ -8,10 +8,11 @@ when OptionClass then or_nil == that.or_nil else or_nil == that end end + private def assert_option(result) case result when OptionClass then return result @@ -96,9 +97,17 @@ end end end class NoneClass < OptionClass + + def dup + raise TypeError, "can't dup NoneClass" + end + + def clone + raise TypeError, "can't clone NoneClass" + end def to_a [] end