diff --git a/lib/repl_type_completor.rb b/lib/repl_type_completor.rb index 10751eb..e725ee9 100644 --- a/lib/repl_type_completor.rb +++ b/lib/repl_type_completor.rb @@ -69,7 +69,7 @@ def analyze_code(code, binding = Object::TOPLEVEL_BINDING) case target_node when Prism::StringNode - return unless target_node.closing&.empty? + return if target_node.opening == "?" || (target_node.closing_loc && !target_node.closing.empty?) call_node, args_node = parents.last(2) return unless call_node.is_a?(Prism::CallNode) && call_node.receiver.nil?