[DRE-maint] Bug#643770: ruby-rchardet: syntax errors when loading with ruby1.9.1
Bram Senders
bram at proggerij.nl
Thu Sep 29 13:12:18 UTC 2011
Package: ruby-rchardet
Version: 1.3-1
Severity: important
Tags: patch
Hi there,
Trying to use ruby-rchardet using ruby1.9.1 gives syntax errors when
loading the module. See the following output:
bram at debian:~$ irb1.9.1 -rrchardet
<internal:lib/rubygems/custom_require>:29:in `require':
/usr/lib/ruby/vendor_ruby/rchardet/chardistribution.rb:60: syntax error,
unexpected ':', expecting keyword_then or ';' or '\n' (SyntaxError)
/usr/lib/ruby/vendor_ruby/rchardet/chardistribution.rb:61: syntax error,
unexpected ':', expecting keyword_then or ';' or '\n'
/usr/lib/ruby/vendor_ruby/rchardet/chardistribution.rb:75: syntax error,
unexpected ':', expecting keyword_then or ';' or '\n'
/usr/lib/ruby/vendor_ruby/rchardet/chardistribution.rb:84: syntax error,
unexpected keyword_end, expecting $end
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/lib/ruby/vendor_ruby/rchardet.rb:25:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/lib/ruby/1.9.1/irb/init.rb:281:in `block in load_modules'
from /usr/lib/ruby/1.9.1/irb/init.rb:279:in `each'
from /usr/lib/ruby/1.9.1/irb/init.rb:279:in `load_modules'
from /usr/lib/ruby/1.9.1/irb/init.rb:20:in `setup'
from /usr/lib/ruby/1.9.1/irb.rb:53:in `start'
from /usr/bin/irb1.9.1:12:in `<main>'
This is because a number of "if" and "for" statements end with a colon,
which was apparently valid in ruby1.8, but is not valid in ruby1.9.1.
Attached is a patch that removes these colons, so that ruby-rchardet
loads without syntax errors.
Cheers,
Bram Senders
bram at proggerij.nl
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages ruby-rchardet depends on:
ii ruby 4.8 ii ruby1.8
[ruby-interpreter] 1.8.7.352-2
ii ruby1.9.1 [ruby-interpreter] 1.9.2.290-2
ruby-rchardet recommends no packages.
ruby-rchardet suggests no packages.
-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rchardet-remove-colons-for-ruby1.9.1.patch
Type: text/x-diff
Size: 4886 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20110929/571cda4d/attachment.patch>
More information about the Pkg-ruby-extras-maintainers
mailing list