Skip to content

Instantly share code, notes, and snippets.

@abacha
Created February 28, 2013 15:15
Show Gist options
  • Select an option

  • Save abacha/5057453 to your computer and use it in GitHub Desktop.

Select an option

Save abacha/5057453 to your computer and use it in GitHub Desktop.
ary = [1,2,3,4,5,6]
def reject(array)
array.reject { |e| e == 3 }
end
reject(ary)
puts "array: #{ary.join}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment