diff options
Diffstat (limited to 'spec/ruby/core/dir/chdir_spec.rb')
| -rw-r--r-- | spec/ruby/core/dir/chdir_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/core/dir/chdir_spec.rb b/spec/ruby/core/dir/chdir_spec.rb index a2383e6bf2..e9b8274382 100644 --- a/spec/ruby/core/dir/chdir_spec.rb +++ b/spec/ruby/core/dir/chdir_spec.rb @@ -88,8 +88,8 @@ describe "Dir.chdir" do end it "raises an Errno::ENOENT if the directory does not exist" do - lambda { Dir.chdir DirSpecs.nonexistent }.should raise_error(Errno::ENOENT) - lambda { Dir.chdir(DirSpecs.nonexistent) { } }.should raise_error(Errno::ENOENT) + -> { Dir.chdir DirSpecs.nonexistent }.should raise_error(Errno::ENOENT) + -> { Dir.chdir(DirSpecs.nonexistent) { } }.should raise_error(Errno::ENOENT) end it "raises an Errno::ENOENT if the original directory no longer exists" do @@ -100,7 +100,7 @@ describe "Dir.chdir" do Dir.mkdir dir1 Dir.mkdir dir2 begin - lambda { + -> { Dir.chdir dir1 do Dir.chdir(dir2) { Dir.unlink dir1 } end |
