Skip to content

Instantly share code, notes, and snippets.

Created February 22, 2013 19:12
Show Gist options
  • Save anonymous/d3f9b86a6400f5c6f76f to your computer and use it in GitHub Desktop.
Save anonymous/d3f9b86a6400f5c6f76f to your computer and use it in GitHub Desktop.
RUBY: Checking for matches between a and b, then appending matches to new array called c is my goal.
def foo(a, b)
c = Array.new;
for i in a
for j in b
if i == j
c << "j"
return unique(c)
error is
part4.rb:7: syntax error, unexpected $end, expecting keyword_end
return unique(c)
^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment