-
Notifications
You must be signed in to change notification settings - Fork 223
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Self referential Constant alias are causing SystemStackError
Ruby LSP Information
Following code snippet is going to cause stack level too deep
Reproduction steps
- Open VS Code editor
- Create test.rb with following content
module RealClass
CONSTANT = {}
end
module Foo
SomeClass = ::SomeClass
RealClass = ::RealClass
UNRESOLVED = SomeClass::CONSTANT
CONSTANT = RealClass::CONSTANT
end
RealClass
Foo::UNRESOLVED- Hoover onto
Foo::UNRESOLVED - Go to Output, select Ruby LSP and observer there is SystemStackError exception:
2025-10-27 12:09:38.460 [info] (test) #<Thread:0x00000001205de6e0 /Users/pkondzior/Projects/ruby-lsp/vendor/bundle/ruby/3.4.0/bundler/gems/ruby-lsp-5333bb8d45ea/lib/ruby_lsp/base_server.rb:155 run> terminated with exception (report_on_exception is true):
2025-10-27 12:09:38.468 [info] (test) /Users/pkondzior/Projects/ruby-lsp/vendor/bundle/ruby/3.4.0/bundler/gems/ruby-lsp-5333bb8d45ea/lib/ruby_indexer/lib/ruby_indexer/index.rb:424:in 'Integer#downto': stack level too deep (SystemStackError
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working