Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::SafeMarshal::Visitors::ToRuby#visit_Gem_SafeMarshal_Elements_Array
visit_Gem_SafeMarshal_Elements_Array(a)
lib/rubygems/safe_marshal/visitors/to_ruby.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/safe_marshal/visitors/to_ruby.rb, line 40
def visit_Gem_SafeMarshal_Elements_Array(a)
array = register_object([])
elements = a.elements
size = elements.size
idx = 0
# not idiomatic, but there's a huge number of IMEMOs allocated here, so we avoid the block
# because this is such a hot path when doing a bundle install with the full index
while idx < size
push_stack idx
array << visit(elements[idx])
idx += 1
end
array
end
No documentation available