Guest User

Untitled

a guest
May 25th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. module Enumerable
  2. # match all strings in enum against a pattern (other)
  3. # or match a string (other) against all patterns in enum
  4. def any_match? other
  5. any? { |i| i.match other }
  6. end
  7. end
Add Comment
Please, Sign In to add comment