From cb574daf62d78d40bceb66c50d5417bbe3ebc746 Mon Sep 17 00:00:00 2001 From: Adam Hess Date: Wed, 18 Sep 2024 16:02:11 -0700 Subject: [PATCH] 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. --- 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 1a29ee4..4669727 100644 --- a/lib/error_highlight/base.rb +++ b/lib/error_highlight/base.rb @@ -85,7 +85,7 @@ def self.spot(obj, **opts) # 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