Skip to content

Commit 33c6f0f

Browse files
committed
Require 'uri' explicitly to address NameError: uninitialized constant ToQueryTest::URI
This commit addresses CI failure at https://buildkite.com/rails/rails-nightly/builds/108#018d57ac-4f2a-45f1-86b9-9015a7b0a463/1165-2002 * Error addressed by this commit ``` $ ruby -v ruby 3.4.0dev (2024-01-30T10:19:23Z master 86547fd69d) [x86_64-linux] $ rm Gemfile.lock $ bundle install $ cd activesupport $ bin/test test/core_ext/object/to_query_test.rb -n test_hash_not_sorted_lexicographically_for_nested_structure ... snip ... E Error: ToQueryTest#test_hash_not_sorted_lexicographically_for_nested_structure: NameError: uninitialized constant ToQueryTest::URI test/core_ext/object/to_query_test.rb:90:in `test_hash_not_sorted_lexicographically_for_nested_structure' bin/test test/core_ext/object/to_query_test.rb:79 Finished in 0.000385s, 2597.3082 runs/s, 0.0000 assertions/s. 1 runs, 0 assertions, 0 failures, 1 errors, 0 skips $ ``` This behavior has been introduced since Ruby 3.4.0dev vendors URI from top level to `Gem::URI` via ruby/ruby@d64d0b5 . Here is the RubyGems one. rubygems/rubygems#7386
1 parent 3295823 commit 33c6f0f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

activesupport/test/core_ext/object/to_query_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
require_relative "../../abstract_unit"
44
require "active_support/core_ext/object/to_query"
55
require "active_support/core_ext/string/output_safety"
6+
require "uri"
67

78
class ToQueryTest < ActiveSupport::TestCase
89
def test_simple_conversion

0 commit comments

Comments
 (0)