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

Fix Regexp warnings on 1.8.7

This commit is contained in:
Ryan Fitzgerald 2012-12-27 17:34:25 -08:00
parent 760f9dc70f
commit b5455a10bc

View file

@ -187,19 +187,19 @@ if !PryTestHelpers.mri18_and_no_real_source_location?
it "should output source defined inside pry" do
pry_tester.tap do |t|
t.eval "hello = proc { puts 'hello world!' }"
t.eval("show-source hello").should =~ /proc { puts/
t.eval("show-source hello").should =~ /proc \{ puts/
end
end
end
it "should output source for procs/lambdas stored in variables" do
hello = proc { puts 'hello world!' }
pry_eval(binding, 'show-source hello').should =~ /proc { puts/
pry_eval(binding, 'show-source hello').should =~ /proc \{ puts/
end
it "should output source for procs/lambdas stored in constants" do
HELLO = proc { puts 'hello world!' }
pry_eval(binding, "show-source HELLO").should =~ /proc { puts/
pry_eval(binding, "show-source HELLO").should =~ /proc \{ puts/
Object.remove_const(:HELLO)
end
@ -229,7 +229,7 @@ if !PryTestHelpers.mri18_and_no_real_source_location?
it "source of variable should take precedence over method that is being shadowed" do
source = @t.eval('show-source hello')
source.should.not =~ /def hello/
source.should =~ /proc { ' smile ' }/
source.should =~ /proc \{ ' smile ' \}/
end
it "source of method being shadowed should take precedence over variable