After installing dhelp which uses ruby, I was frequently seeing during package installation the error message
ERROR: comparison of String with 10 failed
following the invocation of dhelp information processing for the particular package.
In fact, just invoking dhelp_parse at the command line produces the error message
dhelp_parse
ERROR: comparison of String with 10 failed
After investigation, it was ascertained that this error was due to a comparison being done as a string for the console width, but the console width was being treated as a string and was not being automatically converted to an integer.
Therefore the following fix of changing console width from a string to an integer needed to be applied to
PRETTY_NAME="Ubuntu quantal (12.10)"
VERSION="12.10, Quantal Quetzal"
Package: ruby-commandline
Priority: optional
Section: ruby
Installed-Size: 96
Maintainer: Ubuntu Developers <email address hidden>
Architecture: all
Version: 0.7.10-13
Ruby-Versions: ruby1.9.1 ruby1.8
After installing dhelp which uses ruby, I was frequently seeing during package installation the error message
ERROR: comparison of String with 10 failed
following the invocation of dhelp information processing for the particular package.
In fact, just invoking dhelp_parse at the command line produces the error message
dhelp_parse
ERROR: comparison of String with 10 failed
After investigation, it was ascertained that this error was due to a comparison being done as a string for the console width, but the console width was being treated as a string and was not being automatically converted to an integer.
Therefore the following fix of changing console width from a string to an integer needed to be applied to
/usr/lib/ ruby/vendor_ ruby/commandlin e/application. rb
--- application.rb.OLD 2012-05-30 12:59:59.000000000 +0200
DEFAULT_ CONSOLE_ WIDTH
+++ application.rb.NEW 2012-05-30 12:59:59.000000000 +0200
@@ -336,6 +336,7 @@
# Formatting defaults
#
console_width = ENV["COLUMNS"]
+ console_width = console_width.to_i
@columns =
if console_width.nil?
and to
/usr/lib/ ruby/vendor_ ruby/commandlin e/optionparser/ optionparser. rb
--- optionparser.rb.OLD 2012-05-30 12:59:59.000000000 +0200
DEFAULT_ CONSOLE_ WIDTH
+++ optionparser.rb.NEW 2012-05-30 12:59:59.000000000 +0200
@@ -67,6 +67,7 @@
# Formatting defaults
#
console_width = ENV["COLUMNS"]
+ console_width = console_width.to_i
@columns =
if console_width.nil?
in order to ensure that in both cases the comparison test was being done on console width in the form of an integer.
Having applied this changes, dhelp_parse then works without error.
dhelp_parse
Usage: dhelp_parse [-v] [-h] -a doc-base_file1 d-b_f2 ... | -d doc-base_file1 d-b_f2 ... | -i | -r