On Thu, 15 Sep 2022 04:06:44 +0200 Vincent Lefevre wrote:

[...]
> It would be interesting to know where this error could come from
> in the source.
> 
> Concerning the string "      # returns password\n":
> 
> zira:~> grep -r -A2 -B3 'returns password' /usr/lib/ruby
> /usr/lib/ruby/3.0.0/uri/generic.rb-    def password=(password)
> /usr/lib/ruby/3.0.0/uri/generic.rb-      check_password(password)
> /usr/lib/ruby/3.0.0/uri/generic.rb-      set_password(password)
> /usr/lib/ruby/3.0.0/uri/generic.rb:      # returns password
> /usr/lib/ruby/3.0.0/uri/generic.rb-    end
> /usr/lib/ruby/3.0.0/uri/generic.rb-
> --
> /usr/lib/ruby/3.0.0/bundler/vendor/uri/lib/uri/generic.rb-    def 
> password=(password)
> /usr/lib/ruby/3.0.0/bundler/vendor/uri/lib/uri/generic.rb-      
> check_password(password)
> /usr/lib/ruby/3.0.0/bundler/vendor/uri/lib/uri/generic.rb-      
> set_password(password)
> /usr/lib/ruby/3.0.0/bundler/vendor/uri/lib/uri/generic.rb:      # returns 
> password
> /usr/lib/ruby/3.0.0/bundler/vendor/uri/lib/uri/generic.rb-    end
> /usr/lib/ruby/3.0.0/bundler/vendor/uri/lib/uri/generic.rb-
> 
> The "# returns password" seems to be a comment, and I'm wondering why
> one gets an error on a comment. But I don't know Ruby at all...

I know something about Ruby, but I have no clue about this
behavior...   :-(

It seems that some code somewhere (not in apt-listbugs, perhaps in one
of the libraries, I would say) is taking that comment, treating it as a
String, and trying to invoke the `default' method on it.
But the [String] class has no `default' method.
The Hash class has a `[default]' method, but String is not a subclass
of Hash...
String is a subclass of Object, but the [Object] class has no `default'
method.

[String]: <https://ruby-doc.org/core-3.1.2/String.html>
[default]: <https://ruby-doc.org/core-3.1.2/Hash.html#method-i-default>
[Object]: <https://ruby-doc.org/core-3.1.2/Object.html>

This should explain why trying to invoke the `default' method on a
String generates an "undefined method" error.
But it does not explain which code is trying to invoke that
method...   :-(


I am tempted to reassign this bug report to package libruby3.0 (version
3.0.4-8) and let more knowledgeable people investigate.
The above-quoted comment is included in files shipped by package
libruby3.0:

  $ dpkg -S /usr/lib/ruby/3.0.0/uri/generic.rb
  libruby3.0:amd64: /usr/lib/ruby/3.0.0/uri/generic.rb
  $ dpkg -S /usr/lib/ruby/3.0.0/bundler/vendor/uri/lib/uri/generic.rb
  libruby3.0:amd64: /usr/lib/ruby/3.0.0/bundler/vendor/uri/lib/uri/generic.rb



-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

Attachment: pgpXES7_g3rdD.pgp
Description: PGP signature

Reply via email to