Enumerable has a grep method whose first argument can be a predicate proc, and whose optional second argument is a mapping function; so the following works:
some_array.grep(proc {|x| x % 2 == 0}) {|x| x*3} This isn't as readable as a couple of other suggestions (I like anoiaque's simple .select.mapselect.map or histocrat's comprehend gem), but its strengths are that it's already part of the standard library, and is single-pass (doesn'tand doesn't involve creating temporary intermediate arrays), and doesn't require an out-of-bounds value like nil used in the compact-using suggestions.