1
0
Fork 0
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:
Ryan Fitzgerald 2013-11-29 17:14:44 -08:00
parent e63ac30c80
commit 235b65d5b3
2 changed files with 9 additions and 1 deletions

View file

@ -189,7 +189,7 @@ class Pry
object_to_interrogate
else
class << object_to_interrogate
superclass
ancestors.grep(::Class).first
end
end
end

View file

@ -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