lib/persistent_dmnd/array.rb in persistent-dmnd-2.0.5 vs lib/persistent_dmnd/array.rb in persistent-dmnd-2.0.6
- old
+ new
@@ -58,24 +58,24 @@
# @example
# my_array = a💎[:hello, :world]
# my_concurrent_array = my_array.to_concurrent_array
#
def to_concurrent_array
- ConcurrentRubySupport::ensure_concurrent_ruby_loaded
+ ConcurrentRubySupport.ensure_concurrent_ruby_loaded
Concurrent::Array.new(self)
end
- alias :to_concurrent :to_concurrent_array
+ alias_method :to_concurrent, :to_concurrent_array
# Return Concurrent::Tuple with contents of Persistent💎::Array
#
# @example
# my_array = a💎[:hello, :world]
# my_concurrent_tuple = my_array.to_concurrent_tuple
# # => #<Concurrent::Tuple @size=2, @tuple=[<#Concurrent::AtomicReference value:hello>, <#Concurrent::AtomicReference value:world>]>
#
def to_concurrent_tuple
- ConcurrentRubySupport::ensure_concurrent_ruby_loaded
+ ConcurrentRubySupport.ensure_concurrent_ruby_loaded
each.with_index.each_with_object(Concurrent::Tuple.new(size)) do |(item, index), result|
result.set(index, item)
end
end