From 5e86970840145c4f1349dd5729e64960e5b04583 Mon Sep 17 00:00:00 2001 From: kazu Date: Sun, 31 Mar 2019 15:37:45 +0000 Subject: 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 --- test/ruby/test_rubyoptions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ruby') 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]) -- cgit v1.2.3