Skip to content

Commit 8d054dc

Browse files
authored
Merge pull request #1983 from ruby/handle-iseqs-compiled-by-prism
Handle ISEQs compiled by Prism
2 parents 5f5b573 + e2ea824 commit 8d054dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/rbs/prototype/runtime.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,9 @@ def block_from_ast_of(method)
654654
ast = RubyVM::AbstractSyntaxTree.of(method)
655655
rescue ArgumentError
656656
return # When the method is defined in eval
657+
rescue RuntimeError => error
658+
raise unless error.message.include?("prism")
659+
return # When the method was compiled by prism
657660
end
658661

659662
if ast && ast.type == :SCOPE

0 commit comments

Comments
 (0)