summaryrefslogtreecommitdiff
path: root/spec/ruby/language/ensure_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2019-07-27 12:40:09 +0200
committerBenoit Daloze <[email protected]>2019-07-27 12:40:09 +0200
commit5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch)
tree05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/language/ensure_spec.rb
parenta06301b103371b0b7da8eaca26ba744961769f99 (diff)
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/language/ensure_spec.rb')
-rw-r--r--spec/ruby/language/ensure_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/language/ensure_spec.rb b/spec/ruby/language/ensure_spec.rb
index 064627b2f7..a930bda36b 100644
--- a/spec/ruby/language/ensure_spec.rb
+++ b/spec/ruby/language/ensure_spec.rb
@@ -7,7 +7,7 @@ describe "An ensure block inside a begin block" do
end
it "is executed when an exception is raised in it's corresponding begin block" do
- lambda {
+ -> {
begin
ScratchPad << :begin
raise EnsureSpec::Error
@@ -108,7 +108,7 @@ describe "An ensure block inside a method" do
end
it "is executed when an exception is raised in the method" do
- lambda { @obj.raise_in_method_with_ensure }.should raise_error(EnsureSpec::Error)
+ -> { @obj.raise_in_method_with_ensure }.should raise_error(EnsureSpec::Error)
@obj.executed.should == [:method, :ensure]
end
@@ -165,7 +165,7 @@ describe "An ensure block inside a class" do
end
it "is executed when an exception is raised" do
- lambda {
+ -> {
eval <<-ruby
class EnsureInClassExample
ScratchPad << :class
@@ -240,7 +240,7 @@ end
describe "An ensure block inside {} block" do
it "is not allowed" do
- lambda {
+ -> {
eval <<-ruby
lambda {
raise
@@ -258,7 +258,7 @@ ruby_version_is "2.5" do
end
it "is executed when an exception is raised in it's corresponding begin block" do
- lambda {
+ -> {
eval(<<-ruby).call
lambda do
ScratchPad << :begin