[DRE-maint] Bug#705751: ruby-paint fails to `require "rbconfig"`

chrysn chrysn at fsfe.org
Fri Apr 19 17:59:20 UTC 2013


reassign 705751 ruby-paint 0.8.5-1
tags 705751 - help + patch
forwarded 705751 https://github.com/janlelis/paint/issues/9
retitle 705751
thanks

> When /usr/bin/ruby is ruby 1.8 the program fails:
>
> $ lolcat /proc/cpuinfo
> /usr/lib/ruby/vendor_ruby/paint/util.rb:37:in `detect_mode': uninitialized
> constant Module::RbConfig (NameError) 

the problem is not specific to lolcat, but to ruby-paint:

$ irb1.8
irb(main):001:0> require "paint"
=> true
irb(main):002:0> Paint['Ruby', :red]
NameError: uninitialized constant Module::RbConfig

it turned out that `paint/util.rb` is using `RbConfig` without `require
"rbconfig"` -- without knowledge of ruby, i assume that the `require
"rubygems"` makes the module available, and probably nobody used
ruby-paint on 1.8 without rubygems so far.

the patch is trivial, i've suggested it to the upstream author, and
unless he comes up with an even better solution, i'll patch this for
debian.

best regards
chrysn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20130419/b5d18674/attachment.pgp>


More information about the Pkg-ruby-extras-maintainers mailing list