ostruct 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -2
- data/lib/ostruct.rb +10 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed2da7f517c77c1e08ec0927885068879a2d304aebb6c804d5a28937d96ee272
|
4
|
+
data.tar.gz: a4f0bfd0ffd31eec0fb1bd54e0037738758dee9026e6f847713cc35019fdfcb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bd53f08d2b20e753ad004948b2a22ff47956d3fb33424d826e77f672686027bcca16de8e81336dcc0d44233eb6bdb1885e2b5e5467d2d279333f9b98b241e2b
|
7
|
+
data.tar.gz: 1ff610eb44962ec773f04cb1c3ba158b257d1c08a0bd18af5e17d0da2c5036d7c1e1aea56104a25a089c2d820a043069a925f084cc61058211249f94ee28837e
|
data/Rakefile
CHANGED
data/lib/ostruct.rb
CHANGED
@@ -107,7 +107,7 @@
|
|
107
107
|
# For all these reasons, consider not using OpenStruct at all.
|
108
108
|
#
|
109
109
|
class OpenStruct
|
110
|
-
VERSION = "0.3.
|
110
|
+
VERSION = "0.3.3"
|
111
111
|
|
112
112
|
#
|
113
113
|
# Creates a new OpenStruct object. By default, the resulting OpenStruct
|
@@ -233,7 +233,15 @@ class OpenStruct
|
|
233
233
|
elsif name.match?(/!$/)
|
234
234
|
true
|
235
235
|
else
|
236
|
-
method!(name).owner
|
236
|
+
owner = method!(name).owner
|
237
|
+
if owner.class == ::Class
|
238
|
+
owner < ::OpenStruct
|
239
|
+
else
|
240
|
+
self.class.ancestors.any? do |mod|
|
241
|
+
return false if mod == ::OpenStruct
|
242
|
+
mod == owner
|
243
|
+
end
|
244
|
+
end
|
237
245
|
end
|
238
246
|
end
|
239
247
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ostruct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc-Andre Lafortune
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|