diff --git a/lib/http/cookie/ruby_compat.rb b/lib/http/cookie/ruby_compat.rb index b82a069..53782c1 100644 --- a/lib/http/cookie/ruby_compat.rb +++ b/lib/http/cookie/ruby_compat.rb @@ -10,6 +10,10 @@ class Array self[i..-1] = [] self end unless method_defined?(:select!) + + def sort_by!(&block) + replace(sort_by(&block)) + end unless method_defined?(:sort_by!) end class Hash diff --git a/lib/http/cookie_jar/hash_store.rb b/lib/http/cookie_jar/hash_store.rb index 4478fc7..2909eb3 100644 --- a/lib/http/cookie_jar/hash_store.rb +++ b/lib/http/cookie_jar/hash_store.rb @@ -1,13 +1,5 @@ require 'http/cookie_jar' -# :stopdoc: -class Array - def sort_by!(&block) - replace(sort_by(&block)) - end unless method_defined?(:sort_by!) -end -# :startdoc: - class HTTP::CookieJar # A store class that uses a hash-based cookie store. #