We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3394978 commit f54e5b4Copy full SHA for f54e5b4
1 file changed
test/ruby/test_struct.rb
@@ -41,14 +41,14 @@ def test_morethan10members
41
end
42
43
44
- MAX_EMBEDDED_MEMBERS = (
45
- GC::INTERNAL_CONSTANTS[:RVARGC_MAX_ALLOCATE_SIZE] -
46
- GC::INTERNAL_CONSTANTS[:RBASIC_SIZE] -
47
- GC::INTERNAL_CONSTANTS[:RVALUE_OVERHEAD]
48
- ) / RbConfig::SIZEOF["void*"]
49
-
50
def test_larger_than_largest_pool
51
- count = MAX_EMBEDDED_MEMBERS + 1
+ max_embedded_members = (
+ GC::INTERNAL_CONSTANTS[:RVARGC_MAX_ALLOCATE_SIZE] -
+ GC::INTERNAL_CONSTANTS[:RBASIC_SIZE] -
+ GC::INTERNAL_CONSTANTS[:RVALUE_OVERHEAD]
+ ) / RbConfig::SIZEOF["void*"]
+
+ count = max_embedded_members + 1
52
list = Array(0..count)
53
klass = @Struct.new(*list.map { |i| :"a_#{i}"})
54
struct = klass.new(*list)
0 commit comments