Method: AST::Node#dup

Defined in:
lib/ast/node.rb

#dupObject Also known as: clone

Nodes are already frozen, so there is no harm in returning the current node as opposed to initializing from scratch and freezing another one.

Returns:

  • self



115
116
117
# File 'lib/ast/node.rb', line 115

def dup
  self
end