google_hash 0.8.6 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,6 @@
1
+ 0.8.7
2
+ add #each_pair method
3
+
1
4
  0.8.6
2
5
  add #size method
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.6
1
+ 0.8.7
@@ -359,6 +359,7 @@ void init_<%= type %>_<%= english_key_type %>_to_<%= english_value_type %>() {
359
359
  rb_define_method(rb_cGoogleHashLocal, "[]=", RUBY_METHOD_FUNC(rb_ghash_set), 2);
360
360
  rb_define_method(rb_cGoogleHashLocal, "[]", RUBY_METHOD_FUNC(rb_ghash_get_value), 1);
361
361
  rb_define_method(rb_cGoogleHashLocal, "each", RUBY_METHOD_FUNC(rb_ghash_each), 0);
362
+ rb_define_method(rb_cGoogleHashLocal, "each_pair", RUBY_METHOD_FUNC(rb_ghash_each), 0);
362
363
  rb_define_method(rb_cGoogleHashLocal, "values", RUBY_METHOD_FUNC(rb_ghash_values), 0);
363
364
  rb_define_method(rb_cGoogleHashLocal, "keys", RUBY_METHOD_FUNC(rb_ghash_keys), 0);
364
365
  rb_define_method(rb_cGoogleHashLocal, "has_key?", RUBY_METHOD_FUNC(rb_ghash_get_present), 1);
@@ -56,6 +56,9 @@ describe "google_hash" do
56
56
  sum = 0
57
57
  @subject.each{|k, v| sum += k; sum += v}
58
58
  sum.should == (33+34)
59
+ sum = 0
60
+ @subject.each_pair{|k, v| sum += k; sum += v}
61
+ sum.should == (33+34)
59
62
  @subject[33] = 'abc'
60
63
  @subject.each{|k, v|
61
64
  k.should == 33
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.6
4
+ version: 0.8.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: