Skip to content

No method completions after . inside Ruby string interpolations (#{obj.}) #313

Description

@bolandross

Summary

Typing . after an identifier inside a Ruby string interpolation does not show method completions. The same identifier outside the string completes normally.

Reproduction

sentence = gets

# Completions appear here:
sentence.

# Completions do not appear here:
puts "The input consisted of #{sentence.} words."
#                                      ^

Open a .rb file with a language server running (ruby-lsp or Solargraph).
2. Type sentence. outside any string — the completion menu shows methods.
3. Type #{sentence.} inside a double-quoted string — no completion menu.

Manual editor: show completions (ctrl-space) also does not help.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions