From db003eb835b369d1402518d6d378e5db52169973 Mon Sep 17 00:00:00 2001 From: Oskar Eichler Date: Fri, 28 Aug 2026 06:42:34 +0300 Subject: [PATCH] Forward keyword arguments through UploadedFile delegation --- History.md | 3 +++ lib/rack/test/uploaded_file.rb | 1 + 2 files changed, 4 insertions(+) diff --git a/History.md b/History.md index a91aaf7..84e8ebc 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,8 @@ ## main +* Bug fixes: + * Forward keyword arguments through UploadedFile delegation on Ruby 3+. + * Minor enhancements: * Add `Rack::Test::Session#default_input_content_type` and `#convert_input_hash_to_string` private methods to allow for diff --git a/lib/rack/test/uploaded_file.rb b/lib/rack/test/uploaded_file.rb index 5be6dc7..054acd1 100644 --- a/lib/rack/test/uploaded_file.rb +++ b/lib/rack/test/uploaded_file.rb @@ -52,6 +52,7 @@ def path def method_missing(method_name, *args, &block) tempfile.public_send(method_name, *args, &block) end + ruby2_keywords(:method_missing) if respond_to?(:ruby2_keywords, true) # Append to given buffer in 64K chunks to avoid multiple large # copies of file data in memory. Rewind tempfile before and