# File lib/http/cookie/ruby_compat.rb, line 2 def select! # :yield: x i = 0 each_with_index { |x, j| yield x or next self[i] = x if i != j i += 1 } return nil if i == size self[i..-1] = [] self end
# File lib/http/cookie/ruby_compat.rb, line 14 def sort_by!(&block) # :yield: x replace(sort_by(&block)) end