ruby_peter_v 0.0.8 → 0.0.9

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: e366938bf072caf8371100290278e5a06f99afa4
4
- data.tar.gz: 4b910a5a1190a1e7cd747036586a38d566c8952c
3
+ metadata.gz: 9762b0492175ba460a71bc5602d2d42b5f1c2b5e
4
+ data.tar.gz: 3c7ae31f9dc676b795a2caa239bf1a5357e17c96
5
5
  SHA512:
6
- metadata.gz: 8f6ed3f6f642e20dbc4c1eb37f111c0773325151fcd5aa94c66166678c0d3a599a59a013e9fa07092d7e90a912c1a8ce8ed8bacf28f573fbc1ca259da0ac70aa
7
- data.tar.gz: 71317efb8a6f7ac53145e75da57dc4a42bcb277b8efc32ae78e03ab7c4c0f9f7f416d4fdc64b93ee2da0b15e597d9e73b00ce3d3f0c0dd680758872880f7b108
6
+ metadata.gz: 562966d338daaf75304ace84f272bbefd9aa4454f61abaca07b69fb01e0efff1cfb0679e3f7c1e9a9a489da06547dc31b6d49da7b3a49d1721829c0d099fcb45
7
+ data.tar.gz: de6280af695b4badacd306374aa681b5c4865790330adebea3c77199addfb2a30871288597efd014e89353aebb024b9502e820314c8545da5a8961b698a24805
data/HISTORY.txt CHANGED
@@ -35,5 +35,9 @@
35
35
  * Enumerable#single works properly on lazy Enumerables
36
36
  * Object#each_recursively
37
37
 
38
+ 0.0.9 (2013-06-16)
39
+
40
+ * Object#each_recursively always returns self
41
+
38
42
  TODO
39
43
  * Object#assert_keys_in
data/README.md CHANGED
@@ -80,6 +80,8 @@ SetOnceError: Value of foo was 1, trying to set it to 2
80
80
  e.g. for looping over objects that are read from a file that is
81
81
  much larger than the memory size).
82
82
 
83
+ Returns self.
84
+
83
85
  ```
84
86
  2.0.0-p195 :021 > [:a, [:b, [:c]]].each_recursively{ |e| puts e.succ }
85
87
  b
@@ -6,6 +6,7 @@ class Object
6
6
  else
7
7
  yield(self)
8
8
  end
9
+ self
9
10
  end
10
11
 
11
12
  private
@@ -1,3 +1,3 @@
1
1
  module RubyPeterV
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -46,6 +46,13 @@ describe "each_recursively" do
46
46
  end
47
47
  end
48
48
 
49
+ it "returns self" do
50
+ a.stub(:test_it)
51
+ b.each_recursively do |_e|
52
+ a.test_it(_e)
53
+ end.should == b
54
+ end
55
+
49
56
  it "works with lazy in Ruby 2.0" do
50
57
  pending("only Ruby >= 2.0") unless RUBY_VERSION.split('.').first.to_i >= 2
51
58
  a.should_receive(:test_it).with("test").exactly(2).times
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_peter_v
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Vandenabeele
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-02 00:00:00.000000000 Z
11
+ date: 2013-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec