We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e75a35e commit eb5260fCopy full SHA for eb5260f
lib/irb/cmd/ls.rb
@@ -24,7 +24,7 @@ def execute(*arg, grep: nil)
24
end
25
26
def dump_methods(o, klass, obj)
27
- singleton_class = obj.singleton_class rescue nil
+ singleton_class = begin obj.singleton_class; rescue TypeError; nil end
28
maps = class_method_map((singleton_class || klass).ancestors)
29
maps.each do |mod, methods|
30
name = mod == singleton_class ? "#{klass}.methods" : "#{mod}#methods"
0 commit comments