ostruct2 0.2.1 → 0.2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/.index +5 -5
  3. data/HISTORY.rdoc +14 -0
  4. data/lib/ostruct2.rb +7 -3
  5. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2fcf09b23ed91b91870fd515a64e7fa44513464f
4
- data.tar.gz: 4327a077dd669964cce47f54ff49bfb316fe2868
3
+ metadata.gz: 6a0e689ba858212cb5b520e226b582c7228ee619
4
+ data.tar.gz: ddfe23021721889a60dd74daaf0ed79fb2be9464
5
5
  SHA512:
6
- metadata.gz: f59e6b32d413ceca9db6d1a0b9bc04cf0fc169d3772807ad3e90d5f06de216529e0ad2cb96aef7006ff2b16b83f78488a0becd898f2f31b3ab9142ed750a9230
7
- data.tar.gz: bd98053d03cf7ce9e78707c03362a68f3bd5c576c7e5960fc149cfc956710cccf30a2281856e824eb89d5c665df1aeb52d841b322e274c8d9d94d0584cdfdb29
6
+ metadata.gz: 7ee36abeea357351ca76c4d95ef23bc7ef7ddd3ea9ea0e7cff8436e7b52bee8c7947afd8ca947f61af86908fd8a5b385cc3b4985aeabde447742faf7618407d6
7
+ data.tar.gz: bd9f95614e04759c544bc5c303ad3b1f8a191312035c8bd288e5ea15c62342cdcd9f9406f36e0bca75c338198d481ccd32785f0dd4bb5a71989ded5749a6a467
data/.index CHANGED
@@ -8,10 +8,6 @@ authors:
8
8
  email: transfire@gmail.com
9
9
  organizations: []
10
10
  requirements:
11
- - groups:
12
- - build
13
- development: true
14
- name: detroit
15
11
  - groups:
16
12
  - test
17
13
  development: true
@@ -20,6 +16,10 @@ requirements:
20
16
  - test
21
17
  development: true
22
18
  name: ae
19
+ - groups:
20
+ - build
21
+ development: true
22
+ name: rake
23
23
  conflicts: []
24
24
  alternatives: []
25
25
  resources:
@@ -59,5 +59,5 @@ description: |-
59
59
  OStruct2 is a reimplementation of Ruby's standard ostruct.rb library.
60
60
  This new OpenStruct class addresses issues the original has with conflicting
61
61
  member names and cloning.
62
- version: 0.2.1
62
+ version: 0.2.1.1
63
63
  date: '2013-11-21'
@@ -1,5 +1,19 @@
1
1
  = RELEASE HISTORY
2
2
 
3
+ == 0.2.1 | 2013-11-21
4
+
5
+ Primarily this release cleans up the project configuration a bit
6
+ and adds a missing `LICENSE.txt` file. But it also adjusts the `#to_enum`
7
+ method to avoid Ruby 2.0's deprecation of `Enumerator.new(object, method)`.
8
+ I don't know why Matz thought it a good thing to do. It forced us to use
9
+ a less efficent implementaiton using a `Yielder` and `#send`.
10
+
11
+ Changes:
12
+
13
+ * Adjust to_enum to not use Enumerator.new.
14
+ * Add missing LICENSE file.
15
+
16
+
3
17
  == 0.2.0 | 2012-05-23
4
18
 
5
19
  This release brings the new OpenStruct to a production ready state.
@@ -321,10 +321,14 @@ class OpenStruct2 < BasicObject
321
321
  #
322
322
  # @return [Enumerator]
323
323
  #
324
- def to_enum
324
+ def to_enum(methname=:each!)
325
325
  # Why has Ruby 2 deprecated this form?
326
- #::Enumerator.new(self, :each!)
327
- ::Kernel.instance_method(:to_enum).bind(self).call(:each!)
326
+ #::Enumerator.new(self, methname)
327
+ ::Enumerator.new do |y|
328
+ __send__(methname) do |*a|
329
+ y.yield *a
330
+ end
331
+ end
328
332
  end
329
333
 
330
334
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ostruct2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trans
@@ -11,7 +11,7 @@ cert_chain: []
11
11
  date: 2013-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: detroit
14
+ name: qed
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - '>='
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: qed
28
+ name: ae
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '>='
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: ae
42
+ name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '>='