Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Prism::ForNode#copy
copy(**params)
lib/prism/node.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/prism/node.rb, line 6502
def copy(**params)
ForNode.new(
params.fetch(:index) { index },
params.fetch(:collection) { collection },
params.fetch(:statements) { statements },
params.fetch(:for_keyword_loc) { for_keyword_loc },
params.fetch(:in_keyword_loc) { in_keyword_loc },
params.fetch(:do_keyword_loc) { do_keyword_loc },
params.fetch(:end_keyword_loc) { end_keyword_loc },
params.fetch(:location) { location },
)
end
def copy: (**params) -> ForNode