Project

General

Profile

Actions

Bug #20761

closed

[DOC] `RubyVM::AbstractSyntaxTree.of` examples raise because parser is prism by default

Added by Earlopain (Earlopain _) 8 months ago. Updated 8 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:119301]

Description

https://docs.ruby-lang.org/en/master/RubyVM/AbstractSyntaxTree.html#method-c-of

RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
# => <internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of': cannot get AST for ISEQ compiled by prism (RuntimeError)

Same for the method example. Is this method even functional when prism is used, or is the prism gem able to do this somehow?

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0