Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
module Phony
class << self
alias_method :split_default, :split
def split(phone_number)
split_default(phone_number).map {|part|
puts "#{part.class.inspect} -> #{part.inspect}"
if !part.is_a?(Fixnum) && !part.is_a?(String) || (part.respond_to?(:match) && part.match(/Phony::/))
part = nil
end
part
}
end
end
end
@floere

I wonder if this would cover all the bases as well?

module Phony
  class << self
    alias_method :split_default, :split

    def split(phone_number)
      split_default(phone_number).map { |part| part if part.respond_to? :to_str }
    end

  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.