diff options
| -rw-r--r-- | spec/prism.mspec | 4 | ||||
| -rw-r--r-- | spec/ruby/core/warning/element_reference_spec.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/prism.mspec b/spec/prism.mspec index 1671cd3c74..70ca3ac8f8 100644 --- a/spec/prism.mspec +++ b/spec/prism.mspec @@ -1,9 +1,5 @@ # frozen_string_literal: true -# This is turned off because when we run with --parser=prism we explicitly turn -# off experimental warnings to make sure the output is consistent. -MSpec.register(:exclude, "Warning.[] returns default values for categories :deprecated and :experimental") - ## Language MSpec.register(:exclude, "Hash literal raises a SyntaxError at parse time when Symbol key with invalid bytes") MSpec.register(:exclude, "Hash literal raises a SyntaxError at parse time when Symbol key with invalid bytes and 'key: value' syntax used") diff --git a/spec/ruby/core/warning/element_reference_spec.rb b/spec/ruby/core/warning/element_reference_spec.rb index 8cb4018c20..c0ed37ef13 100644 --- a/spec/ruby/core/warning/element_reference_spec.rb +++ b/spec/ruby/core/warning/element_reference_spec.rb @@ -2,6 +2,10 @@ require_relative '../../spec_helper' describe "Warning.[]" do it "returns default values for categories :deprecated and :experimental" do + # If any warning options were set on the Ruby that will be executed, then + # it's possible this test will fail. In this case we will skip this test. + skip if ruby_exe.any? { |opt| opt.start_with?("-W") } + ruby_exe('p [Warning[:deprecated], Warning[:experimental]]').chomp.should == "[false, true]" ruby_exe('p [Warning[:deprecated], Warning[:experimental]]', options: "-w").chomp.should == "[true, true]" end |
