From ac4046d34b4e0850e9ff7573b795284fea6c2741 Mon Sep 17 00:00:00 2001 From: Adam Hess Date: Fri, 19 Jan 2024 12:41:23 -0800 Subject: [PATCH] [ruby/prism] switch unless to if https://github.com/ruby/prism/commit/29bdbf4212 Co-authored-by: Kevin Newton --- lib/prism/node_ext.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/prism/node_ext.rb b/lib/prism/node_ext.rb index e39579f534..1a78759e2c 100644 --- a/lib/prism/node_ext.rb +++ b/lib/prism/node_ext.rb @@ -118,7 +118,7 @@ module Prism current = current.parent end - unless current.is_a?(ConstantReadNode) || current == nil + if !current.is_a?(ConstantReadNode) && !current.nil? raise DynamicPartsInConstantPathError, "Constant path contains dynamic parts. Cannot compute full name" end