Skip to content

Commit 04e9390

Browse files
committed
Add missing AbstractStruct.[] alias for new
1 parent fe386d4 commit 04e9390

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/concurrent/synchronization/abstract_struct.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def ns_initialize(*values)
152152
end
153153
end
154154
clazz.class_exec(&block) unless block.nil?
155+
clazz.singleton_class.send :alias_method, :[], :new
155156
clazz
156157
end
157158
end

0 commit comments

Comments
 (0)