From a42bdeb6402c15a02a1b7eea1ccff7d6f65992de Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Sat, 21 Jan 2023 19:45:49 -0600 Subject: [PATCH] initialize_from(..., partial) is dead code --- lib/stripe/stripe_object.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/stripe/stripe_object.rb b/lib/stripe/stripe_object.rb index b9c39c69..e565c746 100644 --- a/lib/stripe/stripe_object.rb +++ b/lib/stripe/stripe_object.rb @@ -429,13 +429,13 @@ module Stripe # * +:opts:+ Options for StripeObject like an API key. # * +:partial:+ Indicates that the re-initialization should not attempt to # remove accessors. - protected def initialize_from(values, opts, partial = false) + protected def initialize_from(values, opts) @opts = Util.normalize_opts(opts) # the `#send` is here so that we can keep this method private @original_values = self.class.send(:deep_copy, values) - removed = partial ? Set.new : Set.new(@values.keys - values.keys) + removed = Set.new(@values.keys - values.keys) added = Set.new(values.keys - @values.keys) # Wipe old state before setting new. This is useful for e.g. updating a