Skip to content

Instantly share code, notes, and snippets.

@powellnathanj
Forked from joshuamiller/gist:152849
Created July 23, 2009 13:22
Show Gist options
  • Save powellnathanj/152906 to your computer and use it in GitHub Desktop.
Save powellnathanj/152906 to your computer and use it in GitHub Desktop.
>> def select_big(ar)
>> ar.select{|n| n > 2}
>> end
>> select_big([1, 2, 3])
=> [3]
Or you could duck punch it, and re-open Array. Not as succinct as Clojure tho, ur rite there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment