Skip to content

Commit

Permalink
Merge pull request #81 from ruby/pz-fix-3-2-test
Browse files Browse the repository at this point in the history
Fix test for Ruby head
  • Loading branch information
peterzhu2118 authored Nov 26, 2022
2 parents 5849e4e + e6185dd commit 9aa9f42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/net/http/test_httpheader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ def test_initialize
assert_raise(NoMethodError){ @c.initialize_http_header("foo"=>[]) }
assert_raise(ArgumentError){ @c.initialize_http_header("foo"=>"a\nb") }
assert_raise(ArgumentError){ @c.initialize_http_header("foo"=>"a\rb") }
assert_raise(ArgumentError){ @c.initialize_http_header("foo"=>"a\xff") }
end

def test_initialize_with_broken_coderange
error = RUBY_VERSION >= "3.2" ? Encoding::CompatibilityError : ArgumentError
assert_raise(error){ @c.initialize_http_header("foo"=>"a\xff") }
end

def test_initialize_with_symbol
Expand Down

0 comments on commit 9aa9f42

Please sign in to comment.