abitdodgy / words_counted

A Ruby natural language processor.
http://rubywordcount.com
MIT License
159 stars 29 forks source link

Add UTF-8 encoding at head of files to get build green (incompatible encoding regexp match) #12

Closed volontarian closed 9 years ago

volontarian commented 9 years ago

bundle exec rake failed before my pull request like this:

1) WordsCounted::Counter words does not split on unicode chars
  Failure/Error: counter = Counter.new("S?o Paulo")
  Encoding::CompatibilityError:
    incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
  # ./lib/words_counted/counter.rb:16:in `scan'
  # ./lib/words_counted/counter.rb:16:in `initialize'
  # ./spec/words_counted/counter_spec.rb:55:in `new'
  # ./spec/words_counted/counter_spec.rb:55:in `block (3 levels) in <module:WordsCounted>'
abitdodgy commented 9 years ago

@gawlista Nice catch. Cheers! Just to confirm, are you using Ruby 1.9?

volontarian commented 9 years ago

I'm using Ruby 2.1.2 in development and Ruby 2.1.3 in production environment.