diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-01-11 11:45:24 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-01-11 11:49:34 +0900 |
commit | 1c9b5d452e9f2f675130f13393a031e28bf982d7 (patch) | |
tree | bece9835e04d7bfcd59730489854e5f0c9cbb962 /test | |
parent | 8b585f74604318995daa337d41f19fabb9ce3711 (diff) |
Reject command line option ending with `-`
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index c3dbef1b5e..2cbd902f1f 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -121,6 +121,8 @@ class TestRubyOptions < Test::Unit::TestCase assert_in_out_err(["--disable-gems", "--debug", "-e", "p $DEBUG"], "", %w(true), []) + + assert_in_out_err(["--disable-gems", "--debug-", "-e", "p $DEBUG"], "", %w(), /invalid option --debug-/) end q = Regexp.method(:quote) |