Permalink
Browse files

+ more clearly named

  • Loading branch information...
1 parent 88e4ce1 commit 68343a75f5ec6c3621dccfe5a0c25b3aaf8a12fe @floere committed Aug 22, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/phony/national_code.rb
@@ -16,9 +16,9 @@ def initialize national_splitter, local_splitter, normalize = nil
# its parts.
#
def split national_number
- zero, ndc, rest = @national_splitter.split national_number.dup
- return [zero, ndc] unless rest
- [zero, ndc, *@local_splitter.split(rest)]
+ zero, ndc_or_rest, rest = @national_splitter.split national_number.dup
+ return [zero, ndc_or_rest] unless rest
+ [zero, ndc_or_rest, *@local_splitter.split(rest)]
end
# Split gets a number without country code and removes a relative zero.

0 comments on commit 68343a7

Please sign in to comment.