Skip to content

Commit c5f45a1

Browse files
authored
Merge pull request rmosolgo#663 from rmosolgo/fix-concurrent-usage
Support concurrent-ruby 1.0.0
2 parents fcda0e8 + 2c93e77 commit c5f45a1

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Appraisals

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ end
1414
appraise 'rails_4.2' do
1515
gem 'activerecord', '~> 4.2.4'
1616
gem 'actionpack', '~> 4.2.4'
17+
gem 'concurrent-ruby', '1.0.0'
1718
end
1819

1920
appraise 'rails_5.0' do

gemfiles/rails_4.2.gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ gem "sqlite3", :platform => :ruby
77
gem "activerecord-jdbcsqlite3-adapter", :platform => :jruby
88
gem "activerecord", "~> 4.2.4"
99
gem "actionpack", "~> 4.2.4"
10+
gem "concurrent-ruby", "1.0.0"
1011

1112
gemspec :path => "../"

lib/graphql/execution/lazy/lazy_method_map.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def get(value)
4343
private
4444

4545
def find_superclass_method(value_class)
46-
@storage.each { |lazy_class, lazy_value_method|
46+
@storage.each_pair { |lazy_class, lazy_value_method|
4747
return lazy_value_method if value_class < lazy_class
4848
}
4949
nil
@@ -54,7 +54,7 @@ class ConcurrentishMap
5454
extend Forwardable
5555
# Technically this should be under the mutex too,
5656
# but I know it's only used when the lock is already acquired.
57-
def_delegators :@storage, :each, :size
57+
def_delegators :@storage, :each_pair, :size
5858

5959
def initialize
6060
@semaphore = Mutex.new

0 commit comments

Comments
 (0)