diff options
Diffstat (limited to 'spec/ruby/library/set/sortedset/add_spec.rb')
| -rw-r--r-- | spec/ruby/library/set/sortedset/add_spec.rb | 4 |
1 files changed, 2 insertions, 2 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 |
