Skip to content

Instantly share code, notes, and snippets.

@3limin4t0r
Created October 18, 2019 10:33
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 3limin4t0r/05f1e1cba5c590127b9982b0d92c37e2 to your computer and use it in GitHub Desktop.
Save 3limin4t0r/05f1e1cba5c590127b9982b0d92c37e2 to your computer and use it in GitHub Desktop.
index, vendor = MSG.find do |vendor, pattern|
index = log.find_index { |e| e.match?(pattern) }
break index, vendor if index
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment