mug 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mug/hashop.rb +4 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 096507698665e2384dc75549dc0c691729153514
4
- data.tar.gz: cd4bb09ea9fadf13be4494abdb18b648854eac44
3
+ metadata.gz: b8bd20df28d6c397c1b8ca6c6f192535e0e284b7
4
+ data.tar.gz: 95dc5a3fabcffe510bd9d11a401278778b6aa657
5
5
  SHA512:
6
- metadata.gz: 099c99f1bbe1bf272c7d44cf7b32777183f93670c2d5e01854824ce54ab1c7f91e12a327dd217fe93f351214d719dd2439a3d74026f3a96d6d5aea40b5dcd94a
7
- data.tar.gz: a5d64be2b7b44cba756eed062d11413a265c99d21b8ae4d15dcb3e46b057b1a111fa0b7809afd70c58503ff53430429e7f57a7ddda7af289febaaa3124f78af8
6
+ metadata.gz: b3c6fa2f5857995d03b81c775324f5ece3a3f9c1fc6b111420c570920906c12c4956af577d19424fca87522092f7bbcb7cc61037b90dab4e0db3630b59e8612e
7
+ data.tar.gz: 771e8542c3368b7b331e1aa052a06993cb9ade5a0b04fd86953f756b1446b99d188f6f4e16ee506b027d5f1a6260f7b9bc1f10e70fa21f1482ec7fd1c4988292
@@ -3,7 +3,7 @@ class Hash
3
3
 
4
4
  #
5
5
  # Returns a new Hash, whose value is the same as this
6
- # one, with any extras in +o+ added in.
6
+ # one, with any extras in +other_hash+ added in.
7
7
  #
8
8
  # Useful for default options.
9
9
  #
@@ -12,8 +12,8 @@ class Hash
12
12
  # dflt = {:a => 0, :x => 9 }
13
13
  # opts |= dflt # => opts = {:a=>1, :b=>2, :x=>9}
14
14
  #
15
- def | o
16
- o.merge self
15
+ def | other_hash
16
+ other_hash.merge self
17
17
  end
18
18
 
19
19
  #
@@ -43,7 +43,7 @@ class Hash
43
43
  if o.respond_to? :to_hash
44
44
  merge! o.to_hash
45
45
  elsif o.respond_to?(:to_a) && (a = o.to_a) && a.length == 2
46
- store a[0], a[1]
46
+ tap { store a[0], a[1] }
47
47
  elsif o.respond_to? :to_h
48
48
  merge! o.to_h
49
49
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Kerwin