Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commit bacaeb095f..., 'fix invalid byte sequence...' breaks gem on ruby 1.8.x #8

Open
stepheneb opened this issue Aug 14, 2009 · 1 comment

Comments

@stepheneb
Copy link
Contributor

The new code in question is:

open(filename, :encoding=>"utf-8") do |file|

the error reported is:

open-uri.rb:32:in `initialize': can't convert Hash into String (TypeError)

The same error occurs using File.open:

File.open(filename, :encoding=>"utf-8") do |file|

Presumably this only works in Ruby 1.9. I'm building Ruby 1.9 now to check. In the latest Pickaxe book this is the method described for setting the encoding to utf-8 when using File.open:

File.open(filename, 'r:utf-8')

This method also doesn't work in 1.8.x

Also see comments on this commit:

http://github.com/fauna/has_many_polymorphs/commit/bacaeb095f5e8cf7427679b2755680ab24f8503e

@stepheneb
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant