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:
parent
0a5f38041c
commit
bd4817ec15
2 changed files with 8 additions and 4 deletions
|
@ -121,8 +121,12 @@ class Pry
|
|||
# Is this a singleton class?
|
||||
# @return [Boolean]
|
||||
def singleton_class?
|
||||
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)
|
||||
# @return [Boolean]
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue