We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5849e4e + e6185dd commit 9aa9f42Copy full SHA for 9aa9f42
test/net/http/test_httpheader.rb
@@ -28,7 +28,11 @@ def test_initialize
28
assert_raise(NoMethodError){ @c.initialize_http_header("foo"=>[]) }
29
assert_raise(ArgumentError){ @c.initialize_http_header("foo"=>"a\nb") }
30
assert_raise(ArgumentError){ @c.initialize_http_header("foo"=>"a\rb") }
31
- assert_raise(ArgumentError){ @c.initialize_http_header("foo"=>"a\xff") }
+ end
32
+
33
+ def test_initialize_with_broken_coderange
34
+ error = RUBY_VERSION >= "3.2" ? Encoding::CompatibilityError : ArgumentError
35
+ assert_raise(error){ @c.initialize_http_header("foo"=>"a\xff") }
36
end
37
38
def test_initialize_with_symbol
0 commit comments