From 23a532679b406cb53c0edfc00c91c32a5ccd335a Mon Sep 17 00:00:00 2001 From: NAKAMURA Usaku Date: Thu, 30 Mar 2023 21:41:03 +0900 Subject: Fix previous commit --- lib/net/http/header.rb | 4 ++-- version.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/net/http/header.rb b/lib/net/http/header.rb index 526f2713ee..495425d148 100644 --- a/lib/net/http/header.rb +++ b/lib/net/http/header.rb @@ -21,10 +21,10 @@ module Net::HTTPHeader warn "net/http: nil HTTP header: #{key}", uplevel: 3 if $VERBOSE else value = value.strip # raise error for invalid byte sequences - if key.bytesize > MAX_KEY_LENGTH + if key.to_s.bytesize > MAX_KEY_LENGTH raise ArgumentError, "too long (#{key.bytesize} bytes) header: #{key[0, 30].inspect}..." end - if value.bytesize > MAX_FIELD_LENGTH + if value.to_s.bytesize > MAX_FIELD_LENGTH raise ArgumentError, "header #{key} has too long field vallue: #{value.bytesize}" end if value.count("\r\n") > 0 diff --git a/version.h b/version.h index 4148199b3a..ced217f204 100644 --- a/version.h +++ b/version.h @@ -12,7 +12,7 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 6 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 215 +#define RUBY_PATCHLEVEL 216 #define RUBY_RELEASE_YEAR 2023 #define RUBY_RELEASE_MONTH 3 -- cgit v1.2.1