Activity log for bug #1123281

Date Who What changed Old value New value Message
2013-02-12 17:42:26 J G Miller bug added bug
2013-02-12 17:46:22 J G Miller description PRETTY_NAME="Ubuntu quantal (12.10)" VERSION="12.10, Quantal Quetzal" Package: ruby-commandline Priority: optional Section: ruby Installed-Size: 96 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> 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/commandline/application.rb --- application.rb.OLD 2012-05-30 12:59:59.000000000 +0200 +++ 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? DEFAULT_CONSOLE_WIDTH and to /usr/lib/ruby/vendor_ruby/commandline/optionparser/optionparser.rb --- optionparser.rb.OLD 2012-05-30 12:59:59.000000000 +0200 +++ 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? DEFAULT_CONSOLE_WIDTH 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 PRETTY_NAME="Ubuntu quantal (12.10)" VERSION="12.10, Quantal Quetzal" Package: ruby-commandline Priority: optional Section: ruby Installed-Size: 96 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> 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 console width being obtained from the environmental variable COLUMNS in the form of a string and 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/commandline/application.rb --- application.rb.OLD 2012-05-30 12:59:59.000000000 +0200 +++ 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?          DEFAULT_CONSOLE_WIDTH and to /usr/lib/ruby/vendor_ruby/commandline/optionparser/optionparser.rb --- optionparser.rb.OLD 2012-05-30 12:59:59.000000000 +0200 +++ 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?          DEFAULT_CONSOLE_WIDTH 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
2013-02-12 17:47:07 J G Miller tags dhelp ruby-commandline
2013-02-12 18:13:20 Hans Joachim Desserud tags dhelp ruby-commandline dhelp patch quantal ruby-commandline