Move Array#sort_by! to http/cookie/ruby_compat.

This commit is contained in:
Akinori MUSHA 2013-04-16 22:15:29 +09:00
parent 4ef2147138
commit bf9bbe3da8
2 changed files with 4 additions and 8 deletions

View file

@ -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

View file

@ -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.
#