summaryrefslogtreecommitdiff
path: root/test/test_rbconfig.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_rbconfig.rb')
-rw-r--r--test/test_rbconfig.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_rbconfig.rb b/test/test_rbconfig.rb
index 1bbf01b9a6..e01264762d 100644
--- a/test/test_rbconfig.rb
+++ b/test/test_rbconfig.rb
@@ -51,4 +51,19 @@ class TestRbConfig < Test::Unit::TestCase
assert_match(/\$\(sitearch|\$\(rubysitearchprefix\)/, val, "#{key} #{bug7823}")
end
end
+
+ def test_limits_and_sizeof_access_in_ractor
+ assert_separately(["-W0"], <<~'RUBY')
+ r = Ractor.new do
+ sizeof_int = RbConfig::SIZEOF["int"]
+ fixnum_max = RbConfig::LIMITS["FIXNUM_MAX"]
+ [sizeof_int, fixnum_max]
+ end
+
+ sizeof_int, fixnum_max = r.value
+
+ assert_kind_of Integer, sizeof_int, "RbConfig::SIZEOF['int'] should be an Integer"
+ assert_kind_of Integer, fixnum_max, "RbConfig::LIMITS['FIXNUM_MAX'] should be an Integer"
+ RUBY
+ end if defined?(Ractor)
end