lib/ruby_lsp/requests/support/common.rb in ruby-lsp-0.14.0 vs lib/ruby_lsp/requests/support/common.rb in ruby-lsp-0.14.1

- old
+ new

@@ -130,9 +130,24 @@ #{categorized_markdown[:links]} #{categorized_markdown[:documentation]} MARKDOWN end + + sig do + params( + node: T.any( + Prism::ConstantPathNode, + Prism::ConstantReadNode, + Prism::ConstantPathTargetNode, + ), + ).returns(T.nilable(String)) + end + def constant_name(node) + node.full_name + rescue Prism::ConstantPathNode::DynamicPartsInConstantPathError + nil + end end end end end