Skip to content

Commit

Permalink
use ::Array not Concurrent::Array
Browse files Browse the repository at this point in the history
  • Loading branch information
pitr-ch committed Jul 7, 2018
1 parent 141e959 commit aaeaef9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -831,7 +831,7 @@ def rebuild(table)
# no lock needed (or available) if bin >= 0, because we're not popping values from locked_indexes until we've run through the whole table
redo unless (bin >= 0 ? table.cas(i, nil, forwarder) : lock_and_clean_up_reverse_forwarders(table, old_table_size, new_table, i, forwarder))
elsif Node.locked_hash?(node_hash = node.hash)
locked_indexes ||= Array.new
locked_indexes ||= ::Array.new
if bin < 0 && locked_arr_idx > 0
locked_arr_idx -= 1
i, locked_indexes[locked_arr_idx] = locked_indexes[locked_arr_idx], i # swap with another bin
Expand Down
4 changes: 2 additions & 2 deletions lib/concurrent/edge/promises.rb
Expand Up @@ -1797,8 +1797,8 @@ def process_on_blocker_resolution(future, index)

def on_resolvable(resolved_future, index)
all_fulfilled = true
values = Array.new(@Resolutions.size)
reasons = Array.new(@Resolutions.size)
values = ::Array.new(@Resolutions.size)
reasons = ::Array.new(@Resolutions.size)

@Resolutions.each_with_index do |internal_state, i|
fulfilled, values[i], reasons[i] = internal_state.result
Expand Down
2 changes: 1 addition & 1 deletion lib/concurrent/tuple.rb
Expand Up @@ -24,7 +24,7 @@ class Tuple
attr_reader :size

# @!visibility private
Tuple = defined?(Rubinius::Tuple) ? Rubinius::Tuple : Array
Tuple = defined?(Rubinius::Tuple) ? Rubinius::Tuple : ::Array
private_constant :Tuple

# Create a new tuple of the given size.
Expand Down

0 comments on commit aaeaef9

Please sign in to comment.