lib/optional/option.rb in optional-0.0.3 vs lib/optional/option.rb in optional-0.0.4
- old
+ new
@@ -12,10 +12,10 @@
end
private
def from_array(values)
- values.empty? ? None : Some[values.first]
+ values.empty? ? None : Some[*values]
end
def from_value(value)
value.nil? ? None : Some[value]
end