Skip to content
Browse files

ruby-1.9 raises argument error when trying to sort unsortable objects

  • Loading branch information...
1 parent 3a89417 commit 4a6a684998d75efe8ffad41e461b492ed3ae30e2 @dchelimsky committed Oct 9, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 spec/spec/matchers/match_array_spec.rb
View
4 spec/spec/matchers/match_array_spec.rb
@@ -66,7 +66,8 @@ def ==(other)
MESSAGE
end
- it "should not sort items in the error message if they don't all respond to <=>" do
+ it "should not sort items in the error message if they don't all respond to <=>" do
+ with_ruby 1.8 do
lambda {
[UnsortableObject.new(2), UnsortableObject.new(1)].should =~ [UnsortableObject.new(4), UnsortableObject.new(3)]
}.should fail_with(<<-MESSAGE)
@@ -76,6 +77,7 @@ def ==(other)
the extra elements were: [2, 1]
MESSAGE
end
+ end
it "should accurately report extra elements when there are duplicates" do
lambda {

0 comments on commit 4a6a684

Please sign in to comment.
Something went wrong with that request. Please try again.