End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Psych::Handler#alias
alias(anchor)
ext/psych/lib/psych/handler.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/ext/psych/lib/psych/handler.rb, line 110
def alias anchor
end
Called when an alias is found to anchor. anchor will be the name of the anchor found.
Example
Here we have an example of an array that references itself in YAML:
--- &ponies - first element - *ponies
&ponies is the anchor, *ponies is the alias. In this case, alias is called with “ponies”.