From ca2af0fb233e6b8a47ffe0b6411f55fc3ec60f2c Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 30 May 2023 12:19:03 -0500 Subject: [PATCH] Fix for newer ruby --- .rubocop.yml | 3 +++ lib/customer_plan.rb | 1 + 2 files changed, 4 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index 50c780c9089f087ae0276be81246a0eb963254b8..3f8285590943a97fd5bad8d9e28dbda759bfd0af 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -96,6 +96,9 @@ Style/DoubleNegation: EnforcedStyle: allowed_in_returns Enabled: false +Style/ParallelAssignment: + Enabled: false + Style/PerlBackrefs: Enabled: false diff --git a/lib/customer_plan.rb b/lib/customer_plan.rb index b63230867b5bc1dfc532ee96ea1b7ae20b680aa9..d3c51aef0323a986739b06583f1a331807f3b7bd 100644 --- a/lib/customer_plan.rb +++ b/lib/customer_plan.rb @@ -53,6 +53,7 @@ class CustomerPlan end def initialize(customer_id=nil, **kwargs) + kwargs, customer_id = customer_id, nil if customer_id.is_a?(Hash) kwargs[:plan] = kwargs.delete(:plan_name) if kwargs.key?(:plan_name) super(customer_id ? kwargs.merge(customer_id: customer_id) : kwargs) end