From 560272ffa9b5c33df2a8632e3e37b75b1f3a981d Mon Sep 17 00:00:00 2001 From: Pascal Zumkehr Date: Tue, 17 Dec 2024 14:36:16 +0100 Subject: [PATCH] Fix rubocop warnings --- .github/workflows/build.yml | 2 +- .rubocop.yml | 1 + lib/prawn/markup/builders/nestable_builder.rb | 2 +- lib/prawn/markup/builders/table_builder.rb | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 58eb889..be43607 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ["3.0", "3.1", "3.2", "3.3"] + ruby-version: ["3.1", "3.2", "3.3"] steps: - uses: actions/checkout@v4 diff --git a/.rubocop.yml b/.rubocop.yml index 0aec288..3afe18e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,6 +2,7 @@ AllCops: DisplayCopNames: true NewCops: enable SuggestExtensions: false + TargetRubyVersion: 3.1 Exclude: - "*.gemspec" - spec/**/* diff --git a/lib/prawn/markup/builders/nestable_builder.rb b/lib/prawn/markup/builders/nestable_builder.rb index 41165db..04ba4d7 100644 --- a/lib/prawn/markup/builders/nestable_builder.rb +++ b/lib/prawn/markup/builders/nestable_builder.rb @@ -27,7 +27,7 @@ def normalize_cell_hash(hash, cell_width, style_options = {}) end def text_options - (options[:text] || {}) + options[:text] || {} end def compute_image_width(hash, max_width) diff --git a/lib/prawn/markup/builders/table_builder.rb b/lib/prawn/markup/builders/table_builder.rb index d19eb54..96a3745 100644 --- a/lib/prawn/markup/builders/table_builder.rb +++ b/lib/prawn/markup/builders/table_builder.rb @@ -133,7 +133,7 @@ def normalize_cell_hash(node, width, style_options) if width.nil? && total_width width = total_width - column_width_sum - ((columns_without_width - 1) * MIN_COL_WIDTH) end - super(node, width, style_options) + super end def compute_column_widths