Warning: Can't synchronize with repository "(default)" (/usr/local/trac/repos/Linguistics does not appear to contain a Mercurial repository.). Look in the Trac log for more information.

Ticket #13 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

Ruby 1.9.1 require causes error

Reported by: anshul Owned by: deveiant
Priority: high Milestone:
Component: Framework Version: 1.0.5
Severity: critical Keywords:
Cc:

Description

$ ruby --version
ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux]
$ irb
irb(main):001:0> require 'linguistics' 
ArgumentError: invalid byte sequence in UTF-8
	from /usr/lib64/ruby/gems/1.9.1/gems/Linguistics-1.0.5/lib/linguistics/iso639.rb:24:in `==='
	from /usr/lib64/ruby/gems/1.9.1/gems/Linguistics-1.0.5/lib/linguistics/iso639.rb:24:in `block in <module:Linguistics>'
	from /usr/lib64/ruby/gems/1.9.1/gems/Linguistics-1.0.5/lib/linguistics/iso639.rb:22:in `each'
	from /usr/lib64/ruby/gems/1.9.1/gems/Linguistics-1.0.5/lib/linguistics/iso639.rb:22:in `<module:Linguistics>'
	from /usr/lib64/ruby/gems/1.9.1/gems/Linguistics-1.0.5/lib/linguistics/iso639.rb:14:in `<top (required)>'
	from /usr/lib64/ruby/gems/1.9.1/gems/Linguistics-1.0.5/lib/linguistics.rb:29:in `require'
	from /usr/lib64/ruby/gems/1.9.1/gems/Linguistics-1.0.5/lib/linguistics.rb:29:in `<top (required)>'
	from (irb):1:in `require'
	from (irb):1
	from /usr/bin/irb:12:in `<main>'

This is on the latest ruby stable and the latest linguistics stable.

Attachments

ruby.1.9.patch Download (541 bytes) - added by anshul 9 months ago.
Fix?

Change History

Changed 9 months ago by anshul

Fix?

comment:1 Changed 9 months ago by anshul

I am not upto speed with Ruby 1.9 encoding so I am not entirely sure if this is the recommended way of reading oneself but it does seem to work on my system.

Other than this 1.0.5 throws a few warnings here and there but does the job mostly.

comment:2 Changed 9 months ago by deveiant

  • Status changed from new to assigned

Hey, thanks for the report and especially for the patch! I've been using a patched version myself under 1.9.1 for a while now, but I wasn't in a hurry to release anything new as I didn't think anyone still used this library. I guess I should have released it anyway, eh? :)

comment:3 Changed 9 months ago by anshul

You most certainly should have and please do! It's a nice library really. I initially used it a year ago in a text analysis project. These days I use it to allow some convention based configuration in the dsl of my personal projects. Thanks for writing it and making it available.

Also,  require 'linguistics'. I am certainly not the only one! ;)

comment:4 Changed 9 months ago by deveiant

I just released my changes in 1.0.8. If you want to try them out before the gem index catches up, you can download the gem from:

 http://www.deveiate.org/code/linguistics-1.0.8.gem

Thanks again for the report! If it works for you too, I'll close this ticket.

comment:5 Changed 9 months ago by anshul

Works like a a charm! Thanks.

comment:6 Changed 9 months ago by deveiant

  • Status changed from assigned to closed
  • Resolution set to fixed

Excellent!

Note: See TracTickets for help on using tickets.