summaryrefslogtreecommitdiff
path: root/spec/ruby/language/redo_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/language/redo_spec.rb')
-rw-r--r--spec/ruby/language/redo_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/language/redo_spec.rb b/spec/ruby/language/redo_spec.rb
index 53fd30b4f2..9b14c5add1 100644
--- a/spec/ruby/language/redo_spec.rb
+++ b/spec/ruby/language/redo_spec.rb
@@ -1,9 +1,9 @@
-require File.expand_path('../../spec_helper', __FILE__)
+require_relative '../spec_helper'
describe "The redo statement" do
it "restarts block execution if used within block" do
a = []
- lambda {
+ -> {
a << 1
redo if a.size < 2
a << 2
@@ -58,9 +58,9 @@ describe "The redo statement" do
describe "in a method" do
it "is invalid and raises a SyntaxError" do
- lambda {
+ -> {
eval("def m; redo; end")
- }.should raise_error(SyntaxError)
+ }.should.raise(SyntaxError)
end
end
end