diff options
Diffstat (limited to 'lib/optparse.rb')
-rw-r--r-- | lib/optparse.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb index c6e652971e..5cdcabf4a7 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -1595,7 +1595,7 @@ XXX begin sw, = complete(:short, opt) # short option matched. - val = arg.sub(/\A-/, '') + val = arg.delete_prefix('-') has_arg = true rescue InvalidOption # if no short options match, try completion with long |