Skip to content

Commit

Permalink
Flattne the condition
Browse files Browse the repository at this point in the history
  • Loading branch information
pitr-ch committed Jun 3, 2021
1 parent aa83e25 commit 382550c
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions lib/concurrent-ruby/concurrent/map.rb
Expand Up @@ -15,14 +15,12 @@ module Collection
when Concurrent.on_cruby?
require 'concurrent/collection/map/mri_map_backend'
MriMapBackend
when Concurrent.on_rbx? || Concurrent.on_truffleruby?
if defined?(::TruffleRuby::ConcurrentMap)
require 'concurrent/collection/map/truffleruby_map_backend'
TruffleRubyMapBackend
else
require 'concurrent/collection/map/atomic_reference_map_backend'
AtomicReferenceMapBackend
end
when Concurrent.on_truffleruby? && defined?(::TruffleRuby::ConcurrentMap)
require 'concurrent/collection/map/truffleruby_map_backend'
TruffleRubyMapBackend
when Concurrent.on_truffleruby? || Concurrent.on_rbx?
require 'concurrent/collection/map/atomic_reference_map_backend'
AtomicReferenceMapBackend
else
warn 'Concurrent::Map: unsupported Ruby engine, using a fully synchronized Concurrent::Map implementation'
require 'concurrent/collection/map/synchronized_map_backend'
Expand Down Expand Up @@ -119,7 +117,6 @@ class Map < Collection::MapImplementation
# @return [true, false] true if deleted
# @!macro map.atomic_method


def initialize(options = nil, &block)
if options.kind_of?(::Hash)
validate_options_hash!(options)
Expand Down

0 comments on commit 382550c

Please sign in to comment.