Ruby 1.9 support. #2

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
  1. Forced encoding of loaded data to utf-8.
  2. Fixed Vydumschik::Lorem.capitalize_ru(word) method.

Tested on MRI 1.8.7-p357, 1.9.1-p431, 1.9.2-p290, 1.9.3-p0.

@kryzhovnik kryzhovnik Ruby 1.9 support.
    1. Forced encoding of loaded data to utf-8.
    2. Fixed Vydumschik::Lorem.capitalize_ru(word) method.

Tested on MRI 1.8.7-p357, 1.9.1-p431, 1.9.2-p290, 1.9.3-p0.
2e239ea

Met the same, ruby 1.9.3p194.
With fork works fine.

NoMethodError: undefined method `-' for "ц":String

dagron commented Oct 12, 2012

Ruby 1.9.3
puts Vydumschik::Name.surname
Encoding::UndefinedConversionError: "\xD0" from ASCII-8BIT to UTF-8
from /var/lib/gems/1.9.1/gems/vydumschik-0.1.0/lib/vydumschik/name.rb:26:in `encode'

diff  /var/lib/gems/1.9.1/gems/vydumschik-0.1.0/lib/vydumschik/name.rb name.rb
27c27
<       surname += 'а'.force_encoding('ASCII-8BIT') if gender==:female
---
>       surname += 'а' if gender==:female
Owner

leonid-shevtsov commented Oct 15, 2012

Better late than never - I released version 0.2.0 with complete 1.9 support.

Thanks a lot for the pull request. YAML files were better saved with UTF-8 encoding instead of binary; this works with all versions of Ruby and makes YAML files actually readable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment