summaryrefslogtreecommitdiff
path: root/spec/ruby/library/set/sortedset
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/set/sortedset')
-rw-r--r--spec/ruby/library/set/sortedset/add_spec.rb4
-rw-r--r--spec/ruby/library/set/sortedset/exclusion_spec.rb4
-rw-r--r--spec/ruby/library/set/sortedset/initialize_spec.rb2
-rw-r--r--spec/ruby/library/set/sortedset/merge_spec.rb4
-rw-r--r--spec/ruby/library/set/sortedset/proper_subset_spec.rb8
-rw-r--r--spec/ruby/library/set/sortedset/proper_superset_spec.rb8
-rw-r--r--spec/ruby/library/set/sortedset/shared/difference.rb4
-rw-r--r--spec/ruby/library/set/sortedset/shared/intersection.rb4
-rw-r--r--spec/ruby/library/set/sortedset/shared/union.rb4
-rw-r--r--spec/ruby/library/set/sortedset/subset_spec.rb8
-rw-r--r--spec/ruby/library/set/sortedset/superset_spec.rb8
11 files changed, 29 insertions, 29 deletions
diff --git a/spec/ruby/library/set/sortedset/add_spec.rb b/spec/ruby/library/set/sortedset/add_spec.rb
index 721ac7fac0..5f8bde02f5 100644
--- a/spec/ruby/library/set/sortedset/add_spec.rb
+++ b/spec/ruby/library/set/sortedset/add_spec.rb
@@ -8,13 +8,13 @@ describe "SortedSet#add" do
it "takes only values which responds <=>" do
obj = mock('no_comparison_operator')
obj.stub!(:respond_to?).with(:<=>).and_return(false)
- lambda { SortedSet["hello"].add(obj) }.should raise_error(ArgumentError)
+ -> { SortedSet["hello"].add(obj) }.should raise_error(ArgumentError)
end
it "raises on incompatible <=> comparison" do
# Use #to_a here as elements are sorted only when needed.
# Therefore the <=> incompatibility is only noticed on sorting.
- lambda { SortedSet['1', '2'].add(3).to_a }.should raise_error(ArgumentError)
+ -> { SortedSet['1', '2'].add(3).to_a }.should raise_error(ArgumentError)
end
end
diff --git a/spec/ruby/library/set/sortedset/exclusion_spec.rb b/spec/ruby/library/set/sortedset/exclusion_spec.rb
index 59f9f1dfd8..d0f1ab95cb 100644
--- a/spec/ruby/library/set/sortedset/exclusion_spec.rb
+++ b/spec/ruby/library/set/sortedset/exclusion_spec.rb
@@ -12,7 +12,7 @@ describe "SortedSet#^" do
end
it "raises an ArgumentError when passed a non-Enumerable" do
- lambda { @set ^ 3 }.should raise_error(ArgumentError)
- lambda { @set ^ Object.new }.should raise_error(ArgumentError)
+ -> { @set ^ 3 }.should raise_error(ArgumentError)
+ -> { @set ^ Object.new }.should raise_error(ArgumentError)
end
end
diff --git a/spec/ruby/library/set/sortedset/initialize_spec.rb b/spec/ruby/library/set/sortedset/initialize_spec.rb
index cdf756f6b8..1238f4efc4 100644
--- a/spec/ruby/library/set/sortedset/initialize_spec.rb
+++ b/spec/ruby/library/set/sortedset/initialize_spec.rb
@@ -25,6 +25,6 @@ describe "SortedSet#initialize" do
it "raises on incompatible <=> comparison" do
# Use #to_a here as elements are sorted only when needed.
# Therefore the <=> incompatibility is only noticed on sorting.
- lambda { SortedSet.new(['00', nil]).to_a }.should raise_error(ArgumentError)
+ -> { SortedSet.new(['00', nil]).to_a }.should raise_error(ArgumentError)
end
end
diff --git a/spec/ruby/library/set/sortedset/merge_spec.rb b/spec/ruby/library/set/sortedset/merge_spec.rb
index f98f2c83ce..31570ad4db 100644
--- a/spec/ruby/library/set/sortedset/merge_spec.rb
+++ b/spec/ruby/library/set/sortedset/merge_spec.rb
@@ -13,7 +13,7 @@ describe "SortedSet#merge" do
end
it "raises an ArgumentError when passed a non-Enumerable" do
- lambda { SortedSet[1, 2].merge(1) }.should raise_error(ArgumentError)
- lambda { SortedSet[1, 2].merge(Object.new) }.should raise_error(ArgumentError)
+ -> { SortedSet[1, 2].merge(1) }.should raise_error(ArgumentError)
+ -> { SortedSet[1, 2].merge(Object.new) }.should raise_error(ArgumentError)
end
end
diff --git a/spec/ruby/library/set/sortedset/proper_subset_spec.rb b/spec/ruby/library/set/sortedset/proper_subset_spec.rb
index 3b3c2e5c4c..818173a7f9 100644
--- a/spec/ruby/library/set/sortedset/proper_subset_spec.rb
+++ b/spec/ruby/library/set/sortedset/proper_subset_spec.rb
@@ -25,9 +25,9 @@ describe "SortedSet#proper_subset?" do
end
it "raises an ArgumentError when passed a non-SortedSet" do
- lambda { SortedSet[].proper_subset?([]) }.should raise_error(ArgumentError)
- lambda { SortedSet[].proper_subset?(1) }.should raise_error(ArgumentError)
- lambda { SortedSet[].proper_subset?("test") }.should raise_error(ArgumentError)
- lambda { SortedSet[].proper_subset?(Object.new) }.should raise_error(ArgumentError)
+ -> { SortedSet[].proper_subset?([]) }.should raise_error(ArgumentError)
+ -> { SortedSet[].proper_subset?(1) }.should raise_error(ArgumentError)
+ -> { SortedSet[].proper_subset?("test") }.should raise_error(ArgumentError)
+ -> { SortedSet[].proper_subset?(Object.new) }.should raise_error(ArgumentError)
end
end
diff --git a/spec/ruby/library/set/sortedset/proper_superset_spec.rb b/spec/ruby/library/set/sortedset/proper_superset_spec.rb
index 72ae71e2f1..2699290f0e 100644
--- a/spec/ruby/library/set/sortedset/proper_superset_spec.rb
+++ b/spec/ruby/library/set/sortedset/proper_superset_spec.rb
@@ -25,9 +25,9 @@ describe "SortedSet#proper_superset?" do
end
it "raises an ArgumentError when passed a non-SortedSet" do
- lambda { SortedSet[].proper_superset?([]) }.should raise_error(ArgumentError)
- lambda { SortedSet[].proper_superset?(1) }.should raise_error(ArgumentError)
- lambda { SortedSet[].proper_superset?("test") }.should raise_error(ArgumentError)
- lambda { SortedSet[].proper_superset?(Object.new) }.should raise_error(ArgumentError)
+ -> { SortedSet[].proper_superset?([]) }.should raise_error(ArgumentError)
+ -> { SortedSet[].proper_superset?(1) }.should raise_error(ArgumentError)
+ -> { SortedSet[].proper_superset?("test") }.should raise_error(ArgumentError)
+ -> { SortedSet[].proper_superset?(Object.new) }.should raise_error(ArgumentError)
end
end
diff --git a/spec/ruby/library/set/sortedset/shared/difference.rb b/spec/ruby/library/set/sortedset/shared/difference.rb
index cf50ff0eb2..688e23a7a7 100644
--- a/spec/ruby/library/set/sortedset/shared/difference.rb
+++ b/spec/ruby/library/set/sortedset/shared/difference.rb
@@ -9,7 +9,7 @@ describe :sorted_set_difference, shared: true do
end
it "raises an ArgumentError when passed a non-Enumerable" do
- lambda { @set.send(@method, 1) }.should raise_error(ArgumentError)
- lambda { @set.send(@method, Object.new) }.should raise_error(ArgumentError)
+ -> { @set.send(@method, 1) }.should raise_error(ArgumentError)
+ -> { @set.send(@method, Object.new) }.should raise_error(ArgumentError)
end
end
diff --git a/spec/ruby/library/set/sortedset/shared/intersection.rb b/spec/ruby/library/set/sortedset/shared/intersection.rb
index d3cfa96656..045716ad05 100644
--- a/spec/ruby/library/set/sortedset/shared/intersection.rb
+++ b/spec/ruby/library/set/sortedset/shared/intersection.rb
@@ -9,7 +9,7 @@ describe :sorted_set_intersection, shared: true do
end
it "raises an ArgumentError when passed a non-Enumerable" do
- lambda { @set.send(@method, 1) }.should raise_error(ArgumentError)
- lambda { @set.send(@method, Object.new) }.should raise_error(ArgumentError)
+ -> { @set.send(@method, 1) }.should raise_error(ArgumentError)
+ -> { @set.send(@method, Object.new) }.should raise_error(ArgumentError)
end
end
diff --git a/spec/ruby/library/set/sortedset/shared/union.rb b/spec/ruby/library/set/sortedset/shared/union.rb
index 4ff07ef5cc..9015bdc8e3 100644
--- a/spec/ruby/library/set/sortedset/shared/union.rb
+++ b/spec/ruby/library/set/sortedset/shared/union.rb
@@ -9,7 +9,7 @@ describe :sorted_set_union, shared: true do
end
it "raises an ArgumentError when passed a non-Enumerable" do
- lambda { @set.send(@method, 1) }.should raise_error(ArgumentError)
- lambda { @set.send(@method, Object.new) }.should raise_error(ArgumentError)
+ -> { @set.send(@method, 1) }.should raise_error(ArgumentError)
+ -> { @set.send(@method, Object.new) }.should raise_error(ArgumentError)
end
end
diff --git a/spec/ruby/library/set/sortedset/subset_spec.rb b/spec/ruby/library/set/sortedset/subset_spec.rb
index cdada2cdfb..7768692df6 100644
--- a/spec/ruby/library/set/sortedset/subset_spec.rb
+++ b/spec/ruby/library/set/sortedset/subset_spec.rb
@@ -25,9 +25,9 @@ describe "SortedSet#subset?" do
end
it "raises an ArgumentError when passed a non-SortedSet" do
- lambda { SortedSet[].subset?([]) }.should raise_error(ArgumentError)
- lambda { SortedSet[].subset?(1) }.should raise_error(ArgumentError)
- lambda { SortedSet[].subset?("test") }.should raise_error(ArgumentError)
- lambda { SortedSet[].subset?(Object.new) }.should raise_error(ArgumentError)
+ -> { SortedSet[].subset?([]) }.should raise_error(ArgumentError)
+ -> { SortedSet[].subset?(1) }.should raise_error(ArgumentError)
+ -> { SortedSet[].subset?("test") }.should raise_error(ArgumentError)
+ -> { SortedSet[].subset?(Object.new) }.should raise_error(ArgumentError)
end
end
diff --git a/spec/ruby/library/set/sortedset/superset_spec.rb b/spec/ruby/library/set/sortedset/superset_spec.rb
index 663b179a0c..823781b860 100644
--- a/spec/ruby/library/set/sortedset/superset_spec.rb
+++ b/spec/ruby/library/set/sortedset/superset_spec.rb
@@ -25,9 +25,9 @@ describe "SortedSet#superset?" do
end
it "raises an ArgumentError when passed a non-SortedSet" do
- lambda { SortedSet[].superset?([]) }.should raise_error(ArgumentError)
- lambda { SortedSet[].superset?(1) }.should raise_error(ArgumentError)
- lambda { SortedSet[].superset?("test") }.should raise_error(ArgumentError)
- lambda { SortedSet[].superset?(Object.new) }.should raise_error(ArgumentError)
+ -> { SortedSet[].superset?([]) }.should raise_error(ArgumentError)
+ -> { SortedSet[].superset?(1) }.should raise_error(ArgumentError)
+ -> { SortedSet[].superset?("test") }.should raise_error(ArgumentError)
+ -> { SortedSet[].superset?(Object.new) }.should raise_error(ArgumentError)
end
end