instance method
Prism::ParametersNode#===
===(other)
lib/prism/node.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/node.rb, line 14432
def ===(other)
other.is_a?(ParametersNode) &&
(requireds.length == other.requireds.length) &&
requireds.zip(other.requireds).all? { |left, right| left === right } &&
(optionals.length == other.optionals.length) &&
optionals.zip(other.optionals).all? { |left, right| left === right } &&
(rest === other.rest) &&
(posts.length == other.posts.length) &&
posts.zip(other.posts).all? { |left, right| left === right } &&
(keywords.length == other.keywords.length) &&
keywords.zip(other.keywords).all? { |left, right| left === right } &&
(keyword_rest === other.keyword_rest) &&
(block === other.block)
end
Implements case-equality for the node. This is effectively == but without comparing the value of locations. Locations are checked only for presence.