Skip to content

Commit

Permalink
Merge pull request rubymotion-community#89 from scizo/master
Browse files Browse the repository at this point in the history
Fix Persistence::merge to use permanent storage.
  • Loading branch information
Marin Usalj committed Jul 8, 2012
2 parents ed637b7 + 9709d60 commit 282b922
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions motion/core/persistence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ def [](key)
end

def merge(values)
values = Hash[values.map{|key, value| [storage_key(key.to_s), value]}]
storage.registerDefaults values
values.each do |key, value|
storage.setObject(value, forKey: storage_key(key.to_s))
end
storage.synchronize
end

Expand Down

0 comments on commit 282b922

Please sign in to comment.