Skip to content

Commit e2ea824

Browse files
committed
Handle ISEQs compiled by Prism
1 parent 5f5b573 commit e2ea824

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)