Skip to content

Commit

Permalink
Number correction regexp matches the whole number
Browse files Browse the repository at this point in the history
  • Loading branch information
Narnach committed Jan 8, 2010
1 parent 67a58ae commit d63e659
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/number_recognizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def valid?
def correct
old_number = number
case number
when /0[96]6*(\d{8})/
when /^0[96]6*(\d{8})$/
self.number = "00316#{$1}"
else
return false
Expand Down

0 comments on commit d63e659

Please sign in to comment.