1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Support ruby 2.1!

This commit is contained in:
Conrad Irwin 2013-11-09 16:32:52 -05:00
parent 0a5f38041c
commit bd4817ec15
2 changed files with 8 additions and 4 deletions

View file

@ -121,7 +121,11 @@ class Pry
# Is this a singleton class?
# @return [Boolean]
def singleton_class?
wrapped != Pry::Method.safe_send(wrapped, :ancestors).first
if Pry::Method.safe_send(wrapped, :respond_to?, :singleton_class?)
Pry::Method.safe_send(wrapped, :singleton_class?)
else
wrapped != Pry::Method.safe_send(wrapped, :ancestors).first
end
end
# Is this strictly a module? (does not match classes)

View file

@ -161,12 +161,12 @@ describe "ls" do
describe "grep" do
it "should reduce the number of outputted things" do
pry_eval("ls -c").should =~ /ArgumentError/
pry_eval("ls -c --grep Run").should.not =~ /ArgumentError/
pry_eval("ls -c Object").should =~ /ArgumentError/
pry_eval("ls -c Object --grep Run").should.not =~ /ArgumentError/
end
it "should still output matching things" do
pry_eval("ls -c --grep Run").should =~ /RuntimeError/
pry_eval("ls -c Object --grep Run").should =~ /RuntimeError/
end
end