ostruct 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +2 -2
  3. data/lib/ostruct.rb +10 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cafac521ea9784567e49bc7548d3774d65f3d32c88972566466c541bccb37724
4
- data.tar.gz: 7bf0c3b479c72cb4023f8eb15ad67c0aa6166aeaeb0e8af1a03aee30fbc7e586
3
+ metadata.gz: ed2da7f517c77c1e08ec0927885068879a2d304aebb6c804d5a28937d96ee272
4
+ data.tar.gz: a4f0bfd0ffd31eec0fb1bd54e0037738758dee9026e6f847713cc35019fdfcb2
5
5
  SHA512:
6
- metadata.gz: fdd4ca44aba273c8ee9b8bffdb027de16aaa0370d3937a1405c1f2ab60e3756a1e3a12d2b0c103850dc383ec33e563ea96de051930bf90464f1a6f14ac2d87c2
7
- data.tar.gz: dfed525f403cd0c262fd1b24d31aa0f0062fa65e93a6485a99a43e45ea671df15d7e5f3334a11217dadcb3f8a8b94cebb98975459a46cc77f800405fb6459538
6
+ metadata.gz: 0bd53f08d2b20e753ad004948b2a22ff47956d3fb33424d826e77f672686027bcca16de8e81336dcc0d44233eb6bdb1885e2b5e5467d2d279333f9b98b241e2b
7
+ data.tar.gz: 1ff610eb44962ec773f04cb1c3ba158b257d1c08a0bd18af5e17d0da2c5036d7c1e1aea56104a25a089c2d820a043069a925f084cc61058211249f94ee28837e
data/Rakefile CHANGED
@@ -1,8 +1,8 @@
1
1
  task :release do
2
- cur = `git branch --show-current`
2
+ cur = `git branch --show-current`.chomp
3
3
  if cur != 'master'
4
4
  puts 'Release only from master branch'
5
- exit(1)
5
+ exit(-1)
6
6
  end
7
7
  end
8
8
 
@@ -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.2"
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 < OpenStruct
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.2
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-06 00:00:00.000000000 Z
11
+ date: 2021-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler