class Array

Public Instance Methods

_grep_(regexp) click to toggle source

Fix for grep with symbols in ruby <= 1.8.7

# File lib/common_helper.rb, line 88
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) click to toggle source
Alias for: _grep_