summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2024-11-11 12:04:12 +0000
committerMatt Valentine-House <matt@eightbitraptor.com>2024-11-14 10:46:36 +0000
commit42501015b4ffac67671cc5e1daedbacf5840d71b (patch)
tree8d40108e534a4614f52177200f410d4bfa333df5 /test/ruby
parent6795fc4981d29e10da73a9eb23069d7f914115da (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11872
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_gc.rb4
1 files changed, 1 insertions, 3 deletions
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