aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/array/sort_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/array/sort_spec.rb')
-rw-r--r--spec/ruby/core/array/sort_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/core/array/sort_spec.rb b/spec/ruby/core/array/sort_spec.rb
index c0d6628549..6b84a82a48 100644
--- a/spec/ruby/core/array/sort_spec.rb
+++ b/spec/ruby/core/array/sort_spec.rb
@@ -66,7 +66,7 @@ describe "Array#sort" do
it "does not deal with exceptions raised by unimplemented or incorrect #<=>" do
o = Object.new
- lambda {
+ -> {
[o, 1].sort
}.should raise_error(ArgumentError)
end
@@ -78,7 +78,7 @@ describe "Array#sort" do
end
it "raises an error when a given block returns nil" do
- lambda { [1, 2].sort {} }.should raise_error(ArgumentError)
+ -> { [1, 2].sort {} }.should raise_error(ArgumentError)
end
it "does not call #<=> on contained objects when invoked with a block" do
@@ -134,7 +134,7 @@ describe "Array#sort" do
a.sort { |n, m|
ArraySpecs::ComparableWithFixnum.new(n-m)
}.should == [-4, 1, 2, 5, 7, 10, 12]
- lambda {
+ -> {
a.sort { |n, m| (n - m).to_s }
}.should raise_error(ArgumentError)
end
@@ -155,7 +155,7 @@ describe "Array#sort" do
it "raises an error if objects can't be compared" do
a=[ArraySpecs::Uncomparable.new, ArraySpecs::Uncomparable.new]
- lambda {a.sort}.should raise_error(ArgumentError)
+ -> {a.sort}.should raise_error(ArgumentError)
end
# From a strange Rubinius bug
@@ -234,7 +234,7 @@ describe "Array#sort!" do
end
it "raises a #{frozen_error_class} on a frozen array" do
- lambda { ArraySpecs.frozen_array.sort! }.should raise_error(frozen_error_class)
+ -> { ArraySpecs.frozen_array.sort! }.should raise_error(frozen_error_class)
end
it "returns the specified value when it would break in the given block" do