summaryrefslogtreecommitdiff
path: root/spec/ruby/command_line
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-09-17 11:42:26 +0200
committerBenoit Daloze <eregontp@gmail.com>2020-09-17 11:42:26 +0200
commit3f6c0a6d74209b03d0ec54b98b5e1ece40d649f0 (patch)
tree15810b34167d6e88c5d24a7968a97deb5120a91d /spec/ruby/command_line
parentce888bfa231bec52dfd3c1e9562f6ce799d8a389 (diff)
Update to ruby/spec@e829fb0
Diffstat (limited to 'spec/ruby/command_line')
-rw-r--r--spec/ruby/command_line/feature_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/ruby/command_line/feature_spec.rb b/spec/ruby/command_line/feature_spec.rb
index 02571ee8c6a..8848249c641 100644
--- a/spec/ruby/command_line/feature_spec.rb
+++ b/spec/ruby/command_line/feature_spec.rb
@@ -37,11 +37,16 @@ describe "The --enable and --disable flags" do
ruby_exe("p 'foo'.frozen?", options: "--disable-frozen-string-literal").chomp.should == "false"
end
- it "can be used with all" do
+ it "can be used with all for enable" do
e = "p [defined?(Gem), defined?(DidYouMean), $VERBOSE, 'foo'.frozen?]"
env = {'RUBYOPT' => '-w'}
- ruby_exe(e, options: "--enable=all", env: env).chomp.should == "[\"constant\", \"constant\", true, true]"
+ # Use a single variant here because it can be quite slow as it might enable jit, etc
ruby_exe(e, options: "--enable-all", env: env).chomp.should == "[\"constant\", \"constant\", true, true]"
+ end
+
+ it "can be used with all for disable" do
+ e = "p [defined?(Gem), defined?(DidYouMean), $VERBOSE, 'foo'.frozen?]"
+ env = {'RUBYOPT' => '-w'}
ruby_exe(e, options: "--disable=all", env: env).chomp.should == "[nil, nil, false, false]"
ruby_exe(e, options: "--disable-all", env: env).chomp.should == "[nil, nil, false, false]"
end