From 42501015b4ffac67671cc5e1daedbacf5840d71b Mon Sep 17 00:00:00 2001 From: Matt Valentine-House Date: Mon, 11 Nov 2024 12:04:12 +0000 Subject: rb_raise when attempting to set the GC implementation name Instead of silently ignoring the key, we should raise to clearly tell the user that this key is read-only. --- test/ruby/test_gc.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 1eb5451b3f..72fab5c43c 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -127,9 +127,7 @@ class TestGc < Test::Unit::TestCase def test_gc_config_implementation_is_readonly omit unless /darwin|linux/.match(RUBY_PLATFORM) - impl = GC.config[:implementation] - GC.config(implementation: "somethingelse") - assert_equal(impl, GC.config[:implementation]) + assert_raise(ArgumentError) { GC.config(implementation: "somethingelse") } end def test_start_full_mark -- cgit v1.2.3