From: "koic (Koichi ITO) via ruby-core" Date: 2024-07-21T16:42:21+00:00 Subject: [ruby-core:118653] [Ruby master Bug#20644] Requiring URI together with the Parser gem in Ruby 3.4.0dev Issue #20644 has been reported by koic (Koichi ITO). ---------------------------------------- Bug #20644: Requiring URI together with the Parser gem in Ruby 3.4.0dev https://bugs.ruby-lang.org/issues/20644 * Author: koic (Koichi ITO) * Status: Open * ruby -v: ruby 3.4.0dev (2024-07-21T04:00:38Z master c544f26726) [x86_64-darwin23] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Recently, `NameError` occurs when requiring URI together with the Parser gem in Ruby 3.4.0dev. ## Expected (Ruby 3.3.4) No errors occur in the URI gem: ```console $ ruby -rparser -ruri -e '' ``` ## Actual (Ruby 3.4.0dev) The following error occurs in the URI gem: ```console # Please run `gem i parser` if the Parser gem is not installed. $ ruby -rparser -ruri -e '' /Users/koic/.rbenv/versions/3.4-dev/lib/ruby/3.4.0+0/uri/common.rb:26:in 'Module#remove_const': constant URI::Parser not defined (NameError) remove_const(:Parser) if const_defined?(:Parser) ^^^^^^^^^^^^ from /Users/koic/.rbenv/versions/3.4-dev/lib/ruby/3.4.0+0/uri/common.rb:26:in 'URI.parser=' from /Users/koic/.rbenv/versions/3.4-dev/lib/ruby/3.4.0+0/uri/common.rb:46:in '' from /Users/koic/.rbenv/versions/3.4-dev/lib/ruby/3.4.0+0/uri/common.rb:15:in '' from /Users/koic/.rbenv/versions/3.4-dev/lib/ruby/3.4.0+0/uri.rb:94:in 'Kernel#require_relative' from /Users/koic/.rbenv/versions/3.4-dev/lib/ruby/3.4.0+0/uri.rb:94:in '' from :136:in 'Kernel#require' from :136:in 'Kernel#require' ``` Specifically, the CI for the Ruby 3.4 matrix in RuboCop fails: https://github.com/rubocop/rubocop/actions/runs/10026682635/job/27711287086 -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/