pry/pry — Issue #359: error msg when using --super
Author: banister
Created: 2011-12-03 07:39:03+00:00
State: open
Labels: bug

```
[1] (pry) main: 0> ? Pry#repl --super
NoMethodError: undefined method `class_name' for #
from /Users/john/ruby/projects/pry/lib/pry/helpers/command_helpers.rb:44:in `block in get_method_or_raise'
[2] (pry) main: 0> cat --ex

Exception: NoMethodError: undefined method `class_name' for #
--
From: /Users/john/ruby/projects/pry/lib/pry/helpers/command_helpers.rb @ line 44 @ level: 0 of backtrace (of 50).

39:
40: (opts[:super] || 0).times do
41: if meth.super
42: meth = meth.super
43: else
=>44: command_error("The method '#{meth.name}' is not defined in a superclass of '#{class_name(meth.owner)}'.", omit_help)
45: end
46: end
47:
48: set_file_and_dir_locals(meth.source_file)
49: meth
[3] (pry) main: 0>
```