rails/rails — pull request #3314 by macmartine (2011-10-13 00:10:09+00:00)
Title: Remove user-specified delimiter from start when no area code is present (in number_to_phone)

Previously, specifying a delimiter to number_to_phone when no area code is present would result in the delimiter at the start of the resulting phone number:

For example:

number_to_phone("5550000", :delimiter => ".")
would become: .555.0000
but should be: 555.0000

(notice, the leading '.')

This pull request fixes that. All existing tests pass and new test added.