Skip to content

Commit

Permalink
Merge pull request #636 from stripe/brandur-initialize-instance-var
Browse files Browse the repository at this point in the history
Initialize instance variable on the getter too
  • Loading branch information
brandur-stripe authored Apr 5, 2018
2 parents 2f322ca + 776d45f commit 676670c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/stripe/stripe_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def self.additive_object_param(name)
# Returns whether the given name is an additive object parameter. See
# `.additive_object_param` for details.
def self.additive_object_param?(name)
!@additive_params.nil? && @additive_params.include?(name)
@additive_params ||= Set.new
@additive_params.include?(name)
end

def initialize(id = nil, opts = {})
Expand Down

0 comments on commit 676670c

Please sign in to comment.