summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Hess <[email protected]>2024-01-19 12:41:23 -0800
committergit <[email protected]>2024-01-19 22:57:46 +0000
commitac4046d34b4e0850e9ff7573b795284fea6c2741 (patch)
tree2e3311b4de4a3acbb964871ad721fe722d1ffde7
parentcfabe9c51cfa11f4020de119aa2bc707db15cf89 (diff)
[ruby/prism] switch unless to if
https://github.com/ruby/prism/commit/29bdbf4212 Co-authored-by: Kevin Newton <[email protected]>
-rw-r--r--lib/prism/node_ext.rb2
1 files changed, 1 insertions, 1 deletions
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