summaryrefslogtreecommitdiff
path: root/spec/ruby/command_line/rubyopt_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/command_line/rubyopt_spec.rb')
-rw-r--r--spec/ruby/command_line/rubyopt_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/command_line/rubyopt_spec.rb b/spec/ruby/command_line/rubyopt_spec.rb
index ee4e594a1c..a739f23eb8 100644
--- a/spec/ruby/command_line/rubyopt_spec.rb
+++ b/spec/ruby/command_line/rubyopt_spec.rb
@@ -68,13 +68,13 @@ describe "Processing RUBYOPT" do
it "suppresses experimental warnings for '-W:no-experimental'" do
ENV["RUBYOPT"] = '-W:no-experimental'
- result = ruby_exe('0 in a', args: '2>&1')
+ result = ruby_exe('case 0; in a; end', args: '2>&1')
result.should == ""
end
it "suppresses deprecation and experimental warnings for '-W:no-deprecated -W:no-experimental'" do
ENV["RUBYOPT"] = '-W:no-deprecated -W:no-experimental'
- result = ruby_exe('($; = "") in a', args: '2>&1')
+ result = ruby_exe('case ($; = ""); in a; end', args: '2>&1')
result.should == ""
end
end