Skip to content

use ::Module for nesting #774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/debug/server_cdp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ def process_cdp args

def search_const b, expr
cs = expr.delete_prefix('::').split('::')
[Object, *b.eval('Module.nesting')].reverse_each{|mod|
[Object, *b.eval('::Module.nesting')].reverse_each{|mod|
if cs.all?{|c|
if mod.const_defined?(c)
mod = mod.const_get(c)
Expand Down
2 changes: 1 addition & 1 deletion lib/debug/server_dap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ def process_dap args

def search_const b, expr
cs = expr.delete_prefix('::').split('::')
[Object, *b.eval('Module.nesting')].reverse_each{|mod|
[Object, *b.eval('::Module.nesting')].reverse_each{|mod|
if cs.all?{|c|
if mod.const_defined?(c)
mod = mod.const_get(c)
Expand Down
2 changes: 1 addition & 1 deletion lib/debug/thread_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ def show_consts pat, only_self: false
unless only_self
s.ancestors.each{|c| break if c == Object; cs[c] = :ancestors}
if b = current_frame&.binding
b.eval('Module.nesting').each{|c| cs[c] = :nesting unless cs.has_key? c}
b.eval('::Module.nesting').each{|c| cs[c] = :nesting unless cs.has_key? c}
end
end

Expand Down