Follow up: Pull request #497 - Added check for extract_numbers parameter.

This commit is contained in:
Thorsten Eckel 2016-12-06 14:05:19 +01:00
parent 1e23cac9a1
commit 3e5f80b0e3

View file

@ -178,6 +178,7 @@ returns
def self.extract_numbers(text)
# see specs for example
return [] if !text.is_a?(String)
text.scan(/([\d|\s|\-|\(|\)]{6,26})/).map do |match|
normalize_number(match[0])
end