From 67a1e2258974df4b597d019739595c18fbb9a7c1 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Mon, 29 Nov 2021 15:50:28 +0100 Subject: Update to ruby/spec@7f22a0b --- spec/ruby/core/warning/element_set_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'spec/ruby/core/warning/element_set_spec.rb') diff --git a/spec/ruby/core/warning/element_set_spec.rb b/spec/ruby/core/warning/element_set_spec.rb index 3b0ea45c9b..611060fb3a 100644 --- a/spec/ruby/core/warning/element_set_spec.rb +++ b/spec/ruby/core/warning/element_set_spec.rb @@ -27,5 +27,11 @@ ruby_version_is '2.7' do it "raises for unknown category" do -> { Warning[:noop] = false }.should raise_error(ArgumentError, /unknown category: noop/) end + + it "raises for non-Symbol category" do + -> { Warning[42] = false }.should raise_error(TypeError) + -> { Warning[false] = false }.should raise_error(TypeError) + -> { Warning["noop"] = false }.should raise_error(TypeError) + end end end -- cgit v1.2.3