ostruct 0.6.2 → 0.6.3
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.
- checksums.yaml +4 -4
- data/lib/ostruct.rb +5 -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: e36ab53d76adf09c53509a2ac80afb2e8fb7a76fdc18273be6080a32ebf95070
|
4
|
+
data.tar.gz: f837cb94bbf9fab791e752e0eacfbbe6f721052a4673441b4f84794c71eae69b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 254e895a7bfde536dc044638746d605ff0ac435963a98887015f5ef12ff7b1e5c4cdf1a89d18a956d766dc5ea58fcbfab22f737686c97624cb8de7be0d157166
|
7
|
+
data.tar.gz: 0cc6bcb1268e37a81efd0e1fceb08c352e4693d2d799f4dace50bc09b244b2589d3a0bde1e14af04f0183b27b8f9576e2bf479cd258bdb27c8049d359c32b33f
|
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.6.
|
110
|
+
VERSION = "0.6.3"
|
111
111
|
|
112
112
|
HAS_PERFORMANCE_WARNINGS = begin
|
113
113
|
Warning[:performance]
|
@@ -233,7 +233,10 @@ class OpenStruct
|
|
233
233
|
#
|
234
234
|
def new_ostruct_member!(name) # :nodoc:
|
235
235
|
unless @table.key?(name) || is_method_protected!(name)
|
236
|
-
if defined?(::Ractor)
|
236
|
+
if defined?(::Ractor.shareable_proc)
|
237
|
+
getter_proc = Ractor.shareable_proc { @table[name] }
|
238
|
+
setter_proc = Ractor.shareable_proc {|x| @table[name] = x}
|
239
|
+
elsif defined?(::Ractor)
|
237
240
|
getter_proc = nil.instance_eval{ Proc.new { @table[name] } }
|
238
241
|
setter_proc = nil.instance_eval{ Proc.new {|x| @table[name] = x} }
|
239
242
|
::Ractor.make_shareable(getter_proc)
|
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.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc-Andre Lafortune
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Class to build custom data structures, similar to a Hash.
|
14
14
|
email:
|