summaryrefslogtreecommitdiff
path: root/spec/ruby/language/precedence_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/language/precedence_spec.rb')
-rw-r--r--spec/ruby/language/precedence_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/ruby/language/precedence_spec.rb b/spec/ruby/language/precedence_spec.rb
index a342c82156..a911f765b0 100644
--- a/spec/ruby/language/precedence_spec.rb
+++ b/spec/ruby/language/precedence_spec.rb
@@ -253,12 +253,12 @@ describe "Operators" do
end
it "<=> == === != =~ !~ are non-associative" do
- lambda { eval("1 <=> 2 <=> 3") }.should raise_error(SyntaxError)
- lambda { eval("1 == 2 == 3") }.should raise_error(SyntaxError)
- lambda { eval("1 === 2 === 3") }.should raise_error(SyntaxError)
- lambda { eval("1 != 2 != 3") }.should raise_error(SyntaxError)
- lambda { eval("1 =~ 2 =~ 3") }.should raise_error(SyntaxError)
- lambda { eval("1 !~ 2 !~ 3") }.should raise_error(SyntaxError)
+ -> { eval("1 <=> 2 <=> 3") }.should raise_error(SyntaxError)
+ -> { eval("1 == 2 == 3") }.should raise_error(SyntaxError)
+ -> { eval("1 === 2 === 3") }.should raise_error(SyntaxError)
+ -> { eval("1 != 2 != 3") }.should raise_error(SyntaxError)
+ -> { eval("1 =~ 2 =~ 3") }.should raise_error(SyntaxError)
+ -> { eval("1 !~ 2 !~ 3") }.should raise_error(SyntaxError)
end
it "<=> == === != =~ !~ have higher precedence than &&" do
@@ -292,8 +292,8 @@ describe "Operators" do
end
it ".. ... are non-associative" do
- lambda { eval("1..2..3") }.should raise_error(SyntaxError)
- lambda { eval("1...2...3") }.should raise_error(SyntaxError)
+ -> { eval("1..2..3") }.should raise_error(SyntaxError)
+ -> { eval("1...2...3") }.should raise_error(SyntaxError)
end
it ".. ... have higher precedence than ? :" do