hash_order_helper 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9525f6b741b4bc89963ed09244662eee18133aa
4
- data.tar.gz: 5b814deff9182fcd07e653cdda9b7830cdee6b6c
3
+ metadata.gz: 07e5129af5fcf29854a8770f7cb19330381cb21c
4
+ data.tar.gz: a53ce05d4277f921c3576bd1bd3df0f98a37f889
5
5
  SHA512:
6
- metadata.gz: 61e7fe158b6bad7e54f8087617c83367cbef2f5d18d2c7f3d9a0a198538f5afd6e135178d10fda46a484a70fd144f60e6c21f142e5beeeefc073afd7ca50f950
7
- data.tar.gz: d8cdefbbff3d7419f03c1737f352d0a35699bc489dddc6609f5e7bf97861094e809c9948d1da00ea8636b3b7e849523cc3906965f5e169db8bc9ae0ecb097284
6
+ metadata.gz: 5359868791279063784a0cb07d364baaf8f9dff112653bf3f5dfe4c79112f29fb4b7937fbc1cd43f79f4808db6299ab52ef733691abc8ad2260723eee37f38df
7
+ data.tar.gz: 26562ef20322400fb9a7946e92c53ae32f3d7bbeded5e8e509aed929dcc0aad9d8de9fec83f0ece6db8f92760111a2daf0bed7b20980e8a397271719efa49081
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = 'hash_order_helper'
4
- spec.version = '0.1.1'
4
+ spec.version = '0.1.2'
5
5
  spec.authors = ['Genki Sugawara']
6
6
  spec.email = ['sugawara@cookpad.com']
7
7
 
@@ -66,7 +66,7 @@ module HashOrderHelper
66
66
  end
67
67
 
68
68
  def push(push_hash)
69
- hash_keys = self.keys
69
+ hash_keys = self.keys - push_hash.keys
70
70
  hash_keys.push(*push_hash.keys)
71
71
  new_hash = {}
72
72
  hash_keys.each do |key|
@@ -78,7 +78,7 @@ module HashOrderHelper
78
78
  end
79
79
 
80
80
  def unshift(unshift_hash)
81
- hash_keys = self.keys
81
+ hash_keys = self.keys - unshift_hash.keys
82
82
  hash_keys.unshift(*unshift_hash.keys)
83
83
  new_hash = {}
84
84
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash_order_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-11 00:00:00.000000000 Z
11
+ date: 2016-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler