Skip to content

Instantly share code, notes, and snippets.

@underhilllabs
Created November 9, 2021 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save underhilllabs/724c35c1971d25d459237cfbcf5e1d36 to your computer and use it in GitHub Desktop.
Save underhilllabs/724c35c1971d25d459237cfbcf5e1d36 to your computer and use it in GitHub Desktop.
Array.class_eval do
def delete_elements_in(ary)
ary.each do |x|
if index = index(x)
delete_at(index)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment