Skip to content

Commit 7a522e8

Browse files
nanobowersFryguy
andauthored
Update lib/optimist.rb
fixed .match to .match? Co-authored-by: Jason Frey <[email protected]>
1 parent 06ee863 commit 7a522e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/optimist.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ def validate_permitted(arg, value)
854854
def permitted_value?(val)
855855
case permitted
856856
when nil then true
857-
when Regexp then val.match permitted
857+
when Regexp then val.match? permitted
858858
when Range then permitted.to_a.map(&:to_s).include? val
859859
when Array then permitted.map(&:to_s).include? val
860860
else false

0 commit comments

Comments
 (0)