From 0686afb413172a2c8350285156ccbd77487cc69c Mon Sep 17 00:00:00 2001 From: "Ruby 3.4 Compat" Date: Tue, 12 May 2026 16:20:11 +0000 Subject: [PATCH] fix(graphics): wrap Hash.new default in curly braces for Ruby 3.4 Ruby 3.4 no longer accepts implicit keyword arguments passed to Hash.new() as the default value, raising: :37:in 'initialize': unknown keywords: :operands, :render (ArgumentError) Wrapping the default in explicit hash braces preserves the prior behaviour across Ruby 2.7 / 3.0 / 3.1 / 3.2 / 3.3 / 3.4. Refs: prestemos/prestemos_backend upgrade to Ruby 3.4.8 --- lib/origami/graphics/instruction.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/origami/graphics/instruction.rb b/lib/origami/graphics/instruction.rb index 7e667c4..14e29f3 100644 --- a/lib/origami/graphics/instruction.rb +++ b/lib/origami/graphics/instruction.rb @@ -28,7 +28,7 @@ class PDF::Instruction attr_reader :operator attr_accessor :operands - @insns = Hash.new(operands: [], render: lambda{}) + @insns = Hash.new({operands: [], render: lambda{}}) def initialize(operator, *operands) @operator = operator