prawnpdf/prawn

TypeError: can't convert nil into Float

Closed this issue · 1 comments

Actual Behaviour

With v2.5.0 Following code raises TypeError: can't convert nil into Float Exception:

define_grid(rows: 3, columns: 2)

Stacktrace

# /baseimage/cache/bundler/ruby/3.2.0/gems/prawn-2.5.0/lib/prawn/grid.rb:152:in `apply_gutter'
# /baseimage/cache/bundler/ruby/3.2.0/gems/prawn-2.5.0/lib/prawn/grid.rb:111:in `initialize'
# /baseimage/cache/bundler/ruby/3.2.0/gems/prawn-2.5.0/lib/prawn/grid.rb:26:in `new'
# /baseimage/cache/bundler/ruby/3.2.0/gems/prawn-2.5.0/lib/prawn/grid.rb:26:in `define_grid'

Introduced

Introduced with commit be66ddd#diff-316e1e68603693aee61e42d1332a3b54a403d538da2b4285d0fd0400075cd4fc

Expected Behaviour

  • define_grid(rows: 3, columns: 2) uses a default gutter and throws no error
  • The documentation is updated

Duplicate of #1343 - I'm closing this one.