Skip to content

Commit

Permalink
In 1.9.3 Array uses clone so returns an Array instead of a PartsList
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikel Lindsaar committed Jan 13, 2012
1 parent 099605c commit d88fa14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/mail/parts_list.rb
Expand Up @@ -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
Expand Down

0 comments on commit d88fa14

Please sign in to comment.