Skip to content

Commit 1788840

Browse files
committed
Fix Array/Hash monitor not being initialized
Fixes several broken testcases in the Array and Hash specs.
1 parent 3fabacb commit 1788840

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/concurrent/thread_safe/util/array_hash_rbx.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ def initialize(*args)
1414
_mon_initialize
1515
super
1616
end
17+
18+
def self.allocate
19+
obj = super
20+
obj.send(:_mon_initialize)
21+
obj
22+
end
1723
end
1824

1925
klass.superclass.instance_methods(false).each do |method|

0 commit comments

Comments
 (0)