Skip to content

Instantly share code, notes, and snippets.

@oliyoung
Forked from lachlanhardy/gist:70614
Created February 26, 2009 03:13
Show Gist options
  • Save oliyoung/70615 to your computer and use it in GitHub Desktop.
Save oliyoung/70615 to your computer and use it in GitHub Desktop.
def f(ra,n)
r=0
ra.each {|x| r+=1 if x.include? n}
r
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment