Skip to content

Conversation

@tompng
Copy link
Member

@tompng tompng commented Sep 16, 2024

It works with both prism and parse.y

Fixes ci failure

irb(main):001* def foo
irb(main):002*   bar
irb(main):003> end
=> :foo
irb(main):004> RubyVM::AbstractSyntaxTree.of(method("foo")).source
cannot get AST for ISEQ compiled by prism (RuntimeError)
irb(main):005> RubyVM::InstructionSequence.of(method("foo")).script_lines
=> ["def foo\n", "  bar\n", "end\n", ""]
irb(main):006> `ruby -v`
=> "ruby 3.4.0dev (2024-09-16T15:53:56Z master 1e52dde82a) +PRISM [x86_64-linux]\n"

@st0012 st0012 merged commit bcfaa72 into ruby:master Sep 16, 2024
matzbot pushed a commit to ruby/ruby that referenced this pull request Sep 16, 2024
@tompng tompng deleted the source_finder_without_ast branch September 16, 2024 17:52
@st0012 st0012 added the bug Something isn't working label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants