@@ -334,7 +334,7 @@ def any_event_on(default_executor, *futures_and_or_events)
334
334
end
335
335
336
336
module InternalStates
337
- # @private
337
+ # @!visibility private
338
338
class State
339
339
def resolved?
340
340
raise NotImplementedError
@@ -345,9 +345,7 @@ def to_sym
345
345
end
346
346
end
347
347
348
- private_constant :State
349
-
350
- # @private
348
+ # @!visibility private
351
349
class Pending < State
352
350
def resolved?
353
351
false
@@ -358,15 +356,11 @@ def to_sym
358
356
end
359
357
end
360
358
361
- private_constant :Pending
362
-
363
- # @private
359
+ # @!visibility private
364
360
class Reserved < Pending
365
361
end
366
362
367
- private_constant :Reserved
368
-
369
- # @private
363
+ # @!visibility private
370
364
class ResolvedWithResult < State
371
365
def resolved?
372
366
true
@@ -397,9 +391,7 @@ def apply
397
391
end
398
392
end
399
393
400
- private_constant :ResolvedWithResult
401
-
402
- # @private
394
+ # @!visibility private
403
395
class Fulfilled < ResolvedWithResult
404
396
405
397
def initialize ( value )
@@ -427,18 +419,14 @@ def to_sym
427
419
end
428
420
end
429
421
430
- private_constant :Fulfilled
431
-
432
- # @private
422
+ # @!visibility private
433
423
class FulfilledArray < Fulfilled
434
424
def apply ( args , block )
435
425
block . call ( *value , *args )
436
426
end
437
427
end
438
428
439
- private_constant :FulfilledArray
440
-
441
- # @private
429
+ # @!visibility private
442
430
class Rejected < ResolvedWithResult
443
431
def initialize ( reason )
444
432
@Reason = reason
@@ -465,9 +453,7 @@ def apply(args, block)
465
453
end
466
454
end
467
455
468
- private_constant :Rejected
469
-
470
- # @private
456
+ # @!visibility private
471
457
class PartiallyRejected < ResolvedWithResult
472
458
def initialize ( value , reason )
473
459
super ( )
@@ -496,17 +482,16 @@ def apply(args, block)
496
482
end
497
483
end
498
484
499
- private_constant :PartiallyRejected
500
-
501
- PENDING = Pending . new
485
+ # @!visibility private
486
+ PENDING = Pending . new
487
+ # @!visibility private
502
488
RESERVED = Reserved . new
489
+ # @!visibility private
503
490
RESOLVED = Fulfilled . new ( nil )
504
491
505
492
def RESOLVED . to_sym
506
493
:resolved
507
494
end
508
-
509
- private_constant :PENDING , :RESOLVED
510
495
end
511
496
512
497
private_constant :InternalStates
@@ -1202,7 +1187,7 @@ def on_rejection_using(executor, *args, &callback)
1202
1187
# v < 5 ? Promises.future(v, &body) : v
1203
1188
# end
1204
1189
# Promises.future(0, &body).run.value! # => 5
1205
- def run ( run_test = method ( :run_test ) )
1190
+ def run ( run_test = method ( :run_test ) )
1206
1191
RunFuturePromise . new_blocked_by1 ( self , @DefaultExecutor , run_test ) . future
1207
1192
end
1208
1193
0 commit comments