Project

General

Profile

Actions

Bug #20985

closed

Undefined constant in net/http

Added by BertramScharpf (Bertram Scharpf) 11 days ago. Updated 6 days ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [amd64-freebsd14]
[ruby-core:120420]

Description

$ grep -rnH HTTPAuthenticationError /usr/local/lib/ruby
/usr/local/lib/ruby/site_ruby/3.3/rubygems/vendor/net-http/lib/net/http.rb:2455:      raise HTTPAuthenticationError.new('HTTP authentication failed', err)
/usr/local/lib/ruby/3.3/net/http.rb:2455:      raise HTTPAuthenticationError.new('HTTP authentication failed', err)
/usr/local/lib/ruby/3.3/rubygems/vendor/net-http/lib/net/http.rb:2455:      raise HTTPAuthenticationError.new('HTTP authentication failed', err)

$ ruby -r net/http -e 'HTTPAuthenticationError'
-e:1:in `<main>': uninitialized constant HTTPAuthenticationError (NameError)

HTTPAuthenticationError
^^^^^^^^^^^^^^^^^^^^^^^

The raise statement will just transform a meaningful error into a NameError.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0