uhees-php_serialize 1.1.1 → 1.1.2

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.
Files changed (2) hide show
  1. data/lib/php_serialize.rb +2 -3
  2. metadata +1 -1
data/lib/php_serialize.rb CHANGED
@@ -276,10 +276,9 @@ private
276
276
  else # Nope; see if there's a Constant
277
277
  begin
278
278
  classmap[klass] = val = Module.const_get(klass)
279
-
280
279
  val = val.new
281
- rescue NameError # Nope; make a new Struct
282
- classmap[klass] = val = Struct.new(klass.to_s, *attrs.collect { |v| v[0].to_s })
280
+ rescue NameError # Last resort: make a new OpenStruct
281
+ classmap[klass] = val = OpenStruct
283
282
  val = val.new
284
283
  end
285
284
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uhees-php_serialize
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Hurst