lib/slop/option.rb in slop-3.4.7 vs lib/slop/option.rb in slop-3.5.0
- old
+ new
@@ -44,9 +44,10 @@
:string => proc { |v| v.to_s },
:symbol => proc { |v| v.to_sym },
:integer => proc { |v| value_to_integer(v) },
:float => proc { |v| value_to_float(v) },
:range => proc { |v| value_to_range(v) },
+ :regexp => proc { |v| Regexp.new(v) },
:count => proc { |v| @count }
}
if long && long.size > @slop.config[:longest_flag]
@slop.config[:longest_flag] = long.size