> I think I got the > right method but the block is wrong? > > a = nums1.reject {|x| x<10 && x>21} A number can't be both less than 10 and greater than 21, so your block won't match anything in the array. Replace && with || (or better still, to my eyes, "or"). Also, "reject" seems so _negative_. Why not be positive? ;) nums1.select { |x| (10..21).include? x } Some other suggestions for your code: > nums = [] > 200.times do > nums << rand(100) > end nums = (1..200).map { rand(100) } > nums1 = nums.sort > nums1.each {|n| print n, "," } You don't really need a new variable, do you? nums.sort.each do |n| puts n end or just puts nums.sort -- Gavin Sinclair