diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-03-31 15:37:45 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-03-31 15:37:45 +0000 |
commit | 5e86970840145c4f1349dd5729e64960e5b04583 (patch) | |
tree | d767669fdeac5cbe6df9bff0f839aa29c713afc8 /test | |
parent | 4e0420f57749f85bebeabd509f9da73f7ae8c966 (diff) | |
download | ruby-5e86970840145c4f1349dd5729e64960e5b04583.tar.gz |
exp is String, so it's always truthy
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 0f697f949f..aeef074aaa 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -968,7 +968,7 @@ class TestRubyOptions < Test::Unit::TestCase [["disable", "false"], ["enable", "true"]].each do |opt, exp| %W[frozen_string_literal frozen-string-literal].each do |arg| key = "#{opt}=#{arg}" - negopt = exp ? "disable" : "enable" + negopt = exp == "true" ? "disable" : "enable" env = {"RUBYOPT"=>"--#{negopt}=#{arg}"} a.for(key) do assert_in_out_err([env, "--disable=gems", "--#{key}"], 'p("foo".frozen?)', [exp]) |