From: Wayne Vucenic Date: 2002-03-31T04:49:26+09:00 Subject: Re: How to split an Array efficiently? + non-inplace Delete_if Another solution, which happens to be fairly efficient, is module Enumerable def split(&block) [select(&block), reject(&block)] end end Wayne Christopher �zbek writes: C�> I want to split an array depending on the evaluation of a code-block, like C�> this C�> a, b = [1,7,10,3,12].split do |x| C�> x < 10 C�> end C�> # a = [1,7,3] C�> # b = [10,12] C�> I haven't found a function like this (Ruby 1.6.6). Have I missed it?