mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Really, really fix ls bug, with spec
This commit is contained in:
parent
e63ac30c80
commit
235b65d5b3
2 changed files with 9 additions and 1 deletions
|
@ -189,7 +189,7 @@ class Pry
|
|||
object_to_interrogate
|
||||
else
|
||||
class << object_to_interrogate
|
||||
superclass
|
||||
ancestors.grep(::Class).first
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -164,6 +164,14 @@ describe "ls" do
|
|||
autoload :McflurgleTheThird, "/tmp/this-file-d000esnat-exist.rb"
|
||||
lambda{ pry_eval("ls -c") }.should.not.raise
|
||||
end
|
||||
|
||||
it "should show constants for an object's class regardless of mixins" do
|
||||
pry_eval(
|
||||
"cd Pry.new",
|
||||
"extend Module.new",
|
||||
"ls -c"
|
||||
).should.match(/Method/)
|
||||
end
|
||||
end
|
||||
|
||||
describe "grep" do
|
||||
|
|
Loading…
Reference in a new issue