module Polyfill::V2_4::Symbol

Public Instance Methods

casecmp?(other) click to toggle source
# File lib/polyfill/v2_4/symbol.rb, line 4
def casecmp?(other)
  return nil unless other.is_a?(::Symbol)

  casecmp(other) == 0
end
match(*args) click to toggle source
# File lib/polyfill/v2_4/symbol.rb, line 10
def match(*args)
  if block_given?
    to_s.match(*args, &::Proc.new)
  else
    to_s.match(*args)
  end
end
match?(pattern, position = 0) click to toggle source
# File lib/polyfill/v2_4/symbol.rb, line 18
def match?(pattern, position = 0)
  !!(self[position..-1] =~ pattern)
end