Skip to content

Commit

Permalink
deep copy of object
Browse files Browse the repository at this point in the history
  • Loading branch information
sachin-sandhu committed May 22, 2024
1 parent 143bb27 commit 1bef4de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bundler/helpers/v2/lib/functions/lockfile_updater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ def build_definition(dependencies_to_unlock)
# if those sub-deps are top-level dependencies. We only want true
# subdeps unlocked, like they were in the UpdateChecker, so we
# mutate the unlocked gems array.
@gems_to_unlock = {}
@gems_to_unlock = @unlock[:gems].dup
# @gems_to_unlock = {}
@gems_to_unlock = @unlock.dup
unlocked = defn.instance_variable_get(:@unlock).fetch(:gems)
must_not_unlock = defn.dependencies.map { |x| x.name.to_s } -
dependencies_to_unlock
Expand Down

0 comments on commit 1bef4de

Please sign in to comment.