From 1c9b5d452e9f2f675130f13393a031e28bf982d7 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 11 Jan 2022 11:45:24 +0900 Subject: Reject command line option ending with `-` --- test/ruby/test_rubyoptions.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') 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) -- cgit v1.2.3