Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

Proc#syntax_tree

prc.syntax_tree → Ruby::Prism::Node | RubyVM::AbstractSyntaxTree::Node | nil

Returns the AST node that this proc was compiled from. See RubyVM::InstructionSequence#syntax_tree for details and for when nil is returned.

This method is experimental and might change without notice.