From 327de7e7966c213714716aafde50a524149687ef Mon Sep 17 00:00:00 2001 From: Antonio Facciolo Date: Tue, 19 Mar 2024 09:31:04 +0100 Subject: [PATCH] fallback to 0.0 in case of no gutter, fixes #1343 --- lib/prawn/grid.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/prawn/grid.rb b/lib/prawn/grid.rb index 80cd9e268..7413e68b8 100644 --- a/lib/prawn/grid.rb +++ b/lib/prawn/grid.rb @@ -145,12 +145,12 @@ def subdivide(total, num, gutter) def apply_gutter(options) if options.key?(:gutter) - @gutter = Float(options[:gutter]) + @gutter = Float(options[:gutter] || 0.0) @row_gutter = @gutter @column_gutter = @gutter else - @row_gutter = Float(options[:row_gutter]) - @column_gutter = Float(options[:column_gutter]) + @row_gutter = Float(options[:row_gutter] || 0.0) + @column_gutter = Float(options[:column_gutter] || 0.0) @gutter = 0 end end