diff options
Diffstat (limited to 'lib/getoptlong.rb')
-rw-r--r-- | lib/getoptlong.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/getoptlong.rb b/lib/getoptlong.rb index 9c8ed09db9..53badc43f3 100644 --- a/lib/getoptlong.rb +++ b/lib/getoptlong.rb @@ -180,7 +180,7 @@ class GetoptLong # next if i == argument_flag begin - if !i.is_a?(String) || i !~ /^-([^-]|-.+)$/ + if !i.is_a?(String) || i !~ /^-([^\-]|-.+)$/ raise ArgumentError, "an invalid option `#{i}'" end if (@canonical_names.include?(i)) |