daddyz/phonelib — pull request #28 by huntrax11 (2014-05-13 08:36:02+00:00)
Title: Fix #27

Fix for tricky case (#27)
```
2.1.1 :001 > Phonelib.parse '0000','PH'
NoMethodError: undefined method `[]' for nil:NilClass
from /usr/local/rvm/gems/ruby-2.1.1/gems/phonelib-0.3.0/lib/phonelib/phone_analyzer.rb:20:in `analyze'
from /usr/local/rvm/gems/ruby-2.1.1/gems/phonelib-0.3.0/lib/phonelib/phone.rb:24:in `initialize'
from /usr/local/rvm/gems/ruby-2.1.1/gems/phonelib-0.3.0/lib/phonelib/core.rb:108:in `new'
from /usr/local/rvm/gems/ruby-2.1.1/gems/phonelib-0.3.0/lib/phonelib/core.rb:108:in `parse'
from (irb):1
from /usr/local/rvm/rubies/ruby-2.1.1/bin/irb:11:in `

'
2.1.1 :001 > Phonelib.parse '0000','IN'
NoMethodError: undefined method `[]' for nil:NilClass
from /usr/local/rvm/gems/ruby-2.1.1/gems/phonelib-0.3.0/lib/phonelib/phone_analyzer.rb:20:in `analyze'
from /usr/local/rvm/gems/ruby-2.1.1/gems/phonelib-0.3.0/lib/phonelib/phone.rb:24:in `initialize'
from /usr/local/rvm/gems/ruby-2.1.1/gems/phonelib-0.3.0/lib/phonelib/core.rb:108:in `new'
from /usr/local/rvm/gems/ruby-2.1.1/gems/phonelib-0.3.0/lib/phonelib/core.rb:108:in `parse'
from (irb):1
from /usr/local/rvm/rubies/ruby-2.1.1/bin/irb:11:in `

'
```