diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-19 14:19:19 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-19 14:19:19 +0000 |
commit | 808d833d29c3b28c9c2d1c7716cd1fe07d866e8c (patch) | |
tree | 98f945eb3ff5bbb47be4a3b4b7cec62a49306050 /test/ruby | |
parent | 87b88ec83e154be33aa366b39ae5369f3836415c (diff) | |
download | ruby-808d833d29c3b28c9c2d1c7716cd1fe07d866e8c.tar.gz |
test_rubyoptions.rb: don't use obsoleted method
It was removed on r65175.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 1417541282..633d8d0ba7 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -138,11 +138,9 @@ class TestRubyOptions < Test::Unit::TestCase end def test_enable - if JITSupport.supported? - assert_in_out_err(%w(--enable all -e) + [""], "", [], []) - assert_in_out_err(%w(--enable-all -e) + [""], "", [], []) - assert_in_out_err(%w(--enable=all -e) + [""], "", [], []) - end + assert_in_out_err(%w(--enable all -e) + [""], "", [], []) + assert_in_out_err(%w(--enable-all -e) + [""], "", [], []) + assert_in_out_err(%w(--enable=all -e) + [""], "", [], []) assert_in_out_err(%w(--enable foobarbazqux -e) + [""], "", [], /unknown argument for --enable: `foobarbazqux'/) assert_in_out_err(%w(--enable), "", [], /missing argument for --enable/) @@ -200,21 +198,19 @@ class TestRubyOptions < Test::Unit::TestCase end end - if JITSupport.supported? - [ - %w(--version --jit), - %w(--version --enable=jit), - %w(--version --enable-jit), - ].each do |args| - assert_in_out_err(args) do |r, e| - assert_match(VERSION_PATTERN_WITH_JIT, r[0]) - if RubyVM::MJIT.enabled? - assert_equal(RUBY_DESCRIPTION, r[0]) - else - assert_equal(EnvUtil.invoke_ruby(['--jit', '-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0]) - end - assert_equal([], e) + [ + %w(--version --jit), + %w(--version --enable=jit), + %w(--version --enable-jit), + ].each do |args| + assert_in_out_err(args) do |r, e| + assert_match(VERSION_PATTERN_WITH_JIT, r[0]) + if RubyVM::MJIT.enabled? + assert_equal(RUBY_DESCRIPTION, r[0]) + else + assert_equal(EnvUtil.invoke_ruby(['--jit', '-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0]) end + assert_equal([], e) end end end |