Skip to content

Commit 55d1db8

Browse files
committed
Renamed method for better readability.
1 parent e91d501 commit 55d1db8

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

lib/concurrent/agent.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def initialize(initial, opts = {})
6565
@validator = Proc.new { |result| true }
6666
@timeout = opts.fetch(:timeout, TIMEOUT).freeze
6767
@observers = CopyOnWriteObserverSet.new
68-
@executor = get_executor_from_options(opts)
68+
@executor = get_executor_from(opts)
6969
init_mutex
7070
set_deref_options(opts)
7171
end

lib/concurrent/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def finalize_executor(executor)
6565

6666
module OptionsParser
6767

68-
def get_executor_from_options(opts = {})
68+
def get_executor_from(opts = {})
6969
if opts.has_key?(:executor)
7070
opts[:executor]
7171
elsif opts[:operation] == true || opts[:task] == false

lib/concurrent/future.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def initialize(opts = {}, &block)
6464
super(IVar::NO_VALUE, opts)
6565
@state = :unscheduled
6666
@task = block
67-
@executor = get_executor_from_options(opts)
67+
@executor = get_executor_from(opts)
6868
end
6969

7070
# Execute an +:unscheduled+ +Future+. Immediately sets the state to +:pending+ and

lib/concurrent/promise.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Promise
3434
def initialize(opts = {}, &block)
3535
opts.delete_if {|k, v| v.nil?}
3636

37-
@executor = get_executor_from_options(opts)
37+
@executor = get_executor_from(opts)
3838
@parent = opts.fetch(:parent) { nil }
3939
@on_fulfill = opts.fetch(:on_fulfill) { Proc.new{ |result| result } }
4040
@on_reject = opts.fetch(:on_reject) { Proc.new{ |reason| raise reason } }

spec/concurrent/configuration_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module Concurrent
1515

1616
describe OptionsParser do
1717

18-
context 'get_executor_from_options' do
18+
context 'get_executor_from' do
1919
pending
2020
end
2121
end

0 commit comments

Comments
 (0)