diff options
Diffstat (limited to 'spec/ruby/core/dir/shared/chroot.rb')
-rw-r--r-- | spec/ruby/core/dir/shared/chroot.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/core/dir/shared/chroot.rb b/spec/ruby/core/dir/shared/chroot.rb index 2ed033dfed..93699f93be 100644 --- a/spec/ruby/core/dir/shared/chroot.rb +++ b/spec/ruby/core/dir/shared/chroot.rb @@ -15,7 +15,7 @@ describe :dir_chroot_as_root, shared: true do end it "can be used to change the process' root directory" do - lambda { Dir.send(@method, File.dirname(__FILE__)) }.should_not raise_error + -> { Dir.send(@method, File.dirname(__FILE__)) }.should_not raise_error File.exist?("/#{File.basename(__FILE__)}").should be_true end @@ -24,7 +24,7 @@ describe :dir_chroot_as_root, shared: true do end it "raises an Errno::ENOENT exception if the directory doesn't exist" do - lambda { Dir.send(@method, 'xgwhwhsjai2222jg') }.should raise_error(Errno::ENOENT) + -> { Dir.send(@method, 'xgwhwhsjai2222jg') }.should raise_error(Errno::ENOENT) end it "can be escaped from with ../" do |