File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -424,6 +424,14 @@ class Ractor
424424 %a{deprecated: Use Ractor.[]= instead}
425425 def []= : [T] (interned sym, T val) -> T
426426
427+ # <!--
428+ # rdoc-file=ractor.rb
429+ # - ractor.default_port -> port object
430+ # -->
431+ # return default port of the Ractor.
432+ #
433+ def default_port : () -> Port[untyped ]
434+
427435 # <!--
428436 # rdoc-file=ractor.rb
429437 # - inspect()
Original file line number Diff line number Diff line change @@ -105,6 +105,13 @@ class RactorInstanceTest < Test::Unit::TestCase
105105
106106 testing "::Ractor"
107107
108+ def test_default_port
109+ assert_send_type (
110+ "() -> ::Ractor::Port[untyped]" ,
111+ Ractor . current , :default_port
112+ )
113+ end
114+
108115 def test_inspect
109116 assert_send_type "() -> String" ,
110117 Ractor . current , :inspect
You can’t perform that action at this time.
0 commit comments