ruby 1.9 chokes on constants.rb because two lines have unicode multibyte characters.
irb(main):001:0> require 'geocoder/us'
WARNING: Couldn't find the fast C implementation of Levenshtein.distance. Using the much slower Ruby version instead.
SyntaxError: /var/www/geocoder/geocoder/lib/geocoder/us/constants.rb:123: invalid multibyte char (US-ASCII)
/var/www/geocoder/geocoder/lib/geocoder/us/constants.rb:123: invalid multibyte char (US-ASCII)
/var/www/geocoder/geocoder/lib/geocoder/us/constants.rb:123: syntax error, unexpected $end, expecting tASSOC
"Callejón" => "Callejón",
this can be fixed with the 'magic comment' for utf-8.
ruby 1.9 chokes on constants.rb because two lines have unicode multibyte characters.
irb(main):001:0> require 'geocoder/us' WARNING: Couldn't find the fast C implementation of Levenshtein.distance. Using the much slower Ruby version instead. SyntaxError: /var/www/geocoder/geocoder/lib/geocoder/us/constants.rb:123: invalid multibyte char (US-ASCII) /var/www/geocoder/geocoder/lib/geocoder/us/constants.rb:123: invalid multibyte char (US-ASCII) /var/www/geocoder/geocoder/lib/geocoder/us/constants.rb:123: syntax error, unexpected $end, expecting tASSOC "Callejón" => "Callejón",
this can be fixed with the 'magic comment' for utf-8.
--- a/lib/geocoder/us/constants.rb +++ b/lib/geocoder/us/constants.rb @@ -1,3 +1,4 @@ +# coding: utf-8 require 'set' require 'geocoder/us/numbers'