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

Attachment: signature.asc
Description: Digital signature

Reply via email to