class Array

Public Instance Methods

_grep_(regexp) click to toggle source

Fix for grep with symbols in ruby <= 1.8.7

# File lib/common/hacks.rb, line 19
def _grep_(regexp)
  matches = []
  self.each do |value|
    value = value.to_s
    matches << value if value.match(regexp)
  end
  matches
end
Also aliased as: grep
grep(regexp)
Alias for: _grep_