From: "Eregon (Benoit Daloze) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "Eregon (Benoit Daloze)" <noreply@ruby-lang.org>
Subject: [ruby-core:119319] [Ruby master Bug#20761] [DOC] `RubyVM::AbstractSyntaxTree.of` examples raise because parser is prism by default
Date: Fri, 27 Sep 2024 15:00:18 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-109933.20240927150018.53314@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-20761.20240926153835.53314@ruby-lang.org>
Issue #20761 has been updated by Eregon (Benoit Daloze).
Thanks for the links, yes, that seems a perfect use case for more information in `#source_location`, going through `RubyVM` APIs for that feels overly complicated for something so simple.
I found https://bugs.ruby-lang.org/issues/6012 which seems closest to what's needed here, and linked the 2 other related issues to it.
----------------------------------------
Bug #20761: [DOC] `RubyVM::AbstractSyntaxTree.of` examples raise because parser is prism by default
https://bugs.ruby-lang.org/issues/20761#change-109933
* Author: Earlopain (A S)
* Status: Closed
* ruby -v: 3.4-dev
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
https://docs.ruby-lang.org/en/master/RubyVM/AbstractSyntaxTree.html#method-c-of
```rb
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?
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
prev parent reply other threads:[~2024-09-27 15:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-26 15:38 [ruby-core:119301] " Earlopain (A S) via ruby-core
2024-09-26 15:47 ` [ruby-core:119302] " kddnewton (Kevin Newton) via ruby-core
2024-09-26 16:17 ` [ruby-core:119303] " Earlopain (A S) via ruby-core
2024-09-26 16:25 ` [ruby-core:119304] " kddnewton (Kevin Newton) via ruby-core
2024-09-26 16:25 ` [ruby-core:119306] " kddnewton (Kevin Newton) via ruby-core
2024-09-26 16:35 ` [ruby-core:119307] " Earlopain (A S) via ruby-core
2024-09-26 19:37 ` [ruby-core:119309] " kddnewton (Kevin Newton) via ruby-core
2024-09-27 14:30 ` [ruby-core:119315] " Eregon (Benoit Daloze) via ruby-core
2024-09-27 14:37 ` [ruby-core:119316] " Eregon (Benoit Daloze) via ruby-core
2024-09-27 14:44 ` [ruby-core:119317] " Earlopain (A S) via ruby-core
2024-09-27 15:00 ` Eregon (Benoit Daloze) via ruby-core [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-109933.20240927150018.53314@ruby-lang.org \
--to=ruby-core@ml.ruby-lang.org \
--cc=noreply@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).