Skip to content

Commit 4558131

Browse files
committed
Do not deprecate :completed? just alias as :complete?
1 parent c9944c4 commit 4558131

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/concurrent/edge/future.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ def completed?(state = @State.get)
154154
state == :completed
155155
end
156156

157+
alias_method :complete?, :completed?
158+
157159
# Wait until Event is #complete?
158160
# @param [Numeric] timeout the maximum time in second to wait.
159161
# @return [Event] self
@@ -400,14 +402,11 @@ def rejected?
400402

401403
# Has the Future been completed?
402404
# @return [Boolean]
403-
def complete?(state = @State.get)
405+
def completed?(state = @State.get)
404406
success? state or failed? state
405407
end
406408

407-
def completed?(state = @State.get)
408-
deprecated_method 'completed?', 'complete?'
409-
complete? state
410-
end
409+
alias_method :complete?, :completed?
411410

412411
# @return [Object] the value of the Future when success
413412
def value(timeout = nil)

0 commit comments

Comments
 (0)