Permalink
Browse files

In 1.9.3 Array uses clone so returns an Array instead of a PartsList

  • Loading branch information...
1 parent 099605c commit d88fa14c8321f73b740818551d2c501afcb5b153 @mikel committed Jan 13, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/mail/parts_list.rb
View
@@ -26,6 +26,10 @@ def collect!
raise NoMethodError, "#collect! is not defined, please call #collect and create a new PartsList"
end
+ def sort
+ self.class.new(super)
+ end
+
def sort!(order)
sorted = self.sort do |a, b|
# OK, 10000 is arbitrary... if anyone actually wants to explicitly sort 10000 parts of a

0 comments on commit d88fa14

Please sign in to comment.