Compare commits

..

2 Commits

Author SHA1 Message Date
Richard Marmorstein
990792f9c1
Merge pull request #1171 from stripe/richardm-dead-code
Remove unused `partial` param from `initialize_from`
2023-01-23 07:44:31 -08:00
Richard Marmorstein
a42bdeb640 initialize_from(..., partial) is dead code 2023-01-21 19:45:49 -06:00

View File

@ -429,13 +429,13 @@ module Stripe
# * +:opts:+ Options for StripeObject like an API key. # * +:opts:+ Options for StripeObject like an API key.
# * +:partial:+ Indicates that the re-initialization should not attempt to # * +:partial:+ Indicates that the re-initialization should not attempt to
# remove accessors. # remove accessors.
protected def initialize_from(values, opts, partial = false) protected def initialize_from(values, opts)
@opts = Util.normalize_opts(opts) @opts = Util.normalize_opts(opts)
# the `#send` is here so that we can keep this method private # the `#send` is here so that we can keep this method private
@original_values = self.class.send(:deep_copy, values) @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) added = Set.new(values.keys - @values.keys)
# Wipe old state before setting new. This is useful for e.g. updating a # Wipe old state before setting new. This is useful for e.g. updating a