From 4b1e852d3ee79037e1b3963cc00c1407a7b3dda8 Mon Sep 17 00:00:00 2001 From: Adam Hess Date: Wed, 18 Sep 2024 16:02:11 -0700 Subject: [PATCH] [ruby/error_highlight] Prism added node_id and Node#breadth_first_search in the 1.0 release. These methods are required for Prism to be able to find the method from the backtrace. https://github.com/ruby/prism/blob/main/CHANGELOG.md#100---2024-08-28 In practice you will likely only end up in this situation if you previously had pre-1.0 prism installed and upgrade Ruby to a version with Prism as the default parser. https://github.com/ruby/error_highlight/commit/cb574daf62 --- lib/error_highlight/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/error_highlight/base.rb b/lib/error_highlight/base.rb index 1a29ee476c..4669727c65 100644 --- a/lib/error_highlight/base.rb +++ b/lib/error_highlight/base.rb @@ -85,7 +85,7 @@ module ErrorHighlight # corresponding to the backtrace location in the source code. def self.prism_find(location) require "prism" - return nil if Prism::VERSION < "0.29.0" + return nil if Prism::VERSION < "1.0.0" absolute_path = location.absolute_path return unless absolute_path