From: "Jan E." Date: 2012-11-28T02:40:30+09:00 Subject: Re: Getting the smallest Items of an Array Hi, so what does "not work" mean? I don't know your StortedArray class (or rather SortedArray?), but if it works like I think it works, then your method should indeed output the four smallest elements: [1, 2, 5, 7] But what's all this effort for? Why not simply use Ruby's built-in methods for that? smallest = m.sort.first 4 This might not be particularly efficient, but your method isn't either. -- Posted via http://www.ruby-forum.com/.