mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Always pass inherit
param to Module#constants
This fixes the `ls Module` case, because it makes the singleton method
`Module.constants` call the instance method. 🎶
This commit is contained in:
parent
d40527a910
commit
28afdd547d
1 changed files with 1 additions and 1 deletions
|
@ -189,7 +189,7 @@ class Pry
|
|||
return unless opts.present?(:constants) || (!has_user_specified_any_options && interrogating_a_module?)
|
||||
|
||||
mod = interrogating_a_module? ? object_to_interrogate : Object
|
||||
constants = mod.constants
|
||||
constants = mod.constants(true)
|
||||
constants -= (mod.ancestors - [mod]).map(&:constants).flatten unless opts.present?(:verbose)
|
||||
output_section("constants", grep[format_constants(mod, constants)])
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue