rbs 3.0.0.dev.2 → 3.0.0.dev.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/comments.yml +2 -1
- data/.github/workflows/ruby.yml +4 -0
- data/Gemfile.lock +11 -11
- data/Rakefile +2 -2
- data/Steepfile +1 -1
- data/core/array.rbs +573 -423
- data/core/basic_object.rbs +11 -39
- data/core/binding.rbs +1 -1
- data/core/builtin.rbs +8 -0
- data/core/class.rbs +37 -0
- data/core/comparable.rbs +7 -18
- data/core/complex.rbs +2 -2
- data/core/data.rbs +419 -0
- data/core/dir.rbs +52 -104
- data/core/encoding.rbs +22 -181
- data/core/enumerable.rbs +212 -175
- data/core/enumerator/product.rbs +96 -0
- data/core/enumerator.rbs +57 -8
- data/core/errors.rbs +8 -2
- data/core/exception.rbs +41 -0
- data/core/fiber.rbs +95 -12
- data/core/file.rbs +840 -275
- data/core/file_test.rbs +34 -19
- data/core/float.rbs +40 -96
- data/core/gc.rbs +15 -3
- data/core/hash.rbs +113 -175
- data/core/integer.rbs +85 -145
- data/core/io/buffer.rbs +187 -60
- data/core/io/wait.rbs +28 -16
- data/core/io.rbs +1859 -1389
- data/core/kernel.rbs +525 -961
- data/core/match_data.rbs +306 -142
- data/core/math.rbs +506 -234
- data/core/method.rbs +0 -24
- data/core/module.rbs +110 -17
- data/core/nil_class.rbs +2 -0
- data/core/numeric.rbs +76 -144
- data/core/object.rbs +88 -212
- data/core/proc.rbs +17 -5
- data/core/process.rbs +22 -5
- data/core/ractor.rbs +1 -1
- data/core/random.rbs +20 -3
- data/core/range.rbs +91 -89
- data/core/rational.rbs +2 -3
- data/core/rbs/unnamed/argf.rbs +177 -120
- data/core/rbs/unnamed/env_class.rbs +89 -163
- data/core/rbs/unnamed/random.rbs +36 -12
- data/core/refinement.rbs +8 -0
- data/core/regexp.rbs +462 -272
- data/core/ruby_vm.rbs +210 -0
- data/{stdlib/set/0 → core}/set.rbs +43 -47
- data/core/string.rbs +1403 -1332
- data/core/string_io.rbs +191 -107
- data/core/struct.rbs +67 -63
- data/core/symbol.rbs +187 -201
- data/core/thread.rbs +40 -35
- data/core/time.rbs +902 -826
- data/core/trace_point.rbs +55 -6
- data/core/unbound_method.rbs +48 -24
- data/docs/collection.md +4 -0
- data/docs/syntax.md +55 -0
- data/ext/rbs_extension/parser.c +5 -6
- data/lib/rbs/cli.rb +6 -1
- data/lib/rbs/collection/cleaner.rb +8 -1
- data/lib/rbs/collection/config/lockfile.rb +3 -1
- data/lib/rbs/collection/config/lockfile_generator.rb +16 -14
- data/lib/rbs/collection/config.rb +1 -1
- data/lib/rbs/collection/sources/git.rb +9 -2
- data/lib/rbs/collection/sources/local.rb +79 -0
- data/lib/rbs/collection/sources.rb +8 -1
- data/lib/rbs/environment.rb +6 -5
- data/lib/rbs/environment_loader.rb +3 -2
- data/lib/rbs/errors.rb +18 -0
- data/lib/rbs/locator.rb +26 -7
- data/lib/rbs/sorter.rb +2 -2
- data/lib/rbs/version.rb +1 -1
- data/sig/collection/sources.rbs +32 -3
- data/sig/environment.rbs +2 -3
- data/sig/locator.rbs +14 -2
- data/sig/shims/{abstract_syntax_tree.rbs → _abstract_syntax_tree.rbs} +0 -0
- data/stdlib/bigdecimal/0/big_decimal.rbs +16 -13
- data/stdlib/cgi/0/core.rbs +16 -0
- data/stdlib/coverage/0/coverage.rbs +50 -8
- data/stdlib/csv/0/csv.rbs +1 -1
- data/stdlib/date/0/date.rbs +856 -726
- data/stdlib/date/0/date_time.rbs +83 -210
- data/stdlib/erb/0/erb.rbs +13 -36
- data/stdlib/etc/0/etc.rbs +127 -20
- data/stdlib/fileutils/0/fileutils.rbs +1290 -381
- data/stdlib/logger/0/logger.rbs +466 -316
- data/stdlib/net-http/0/net-http.rbs +2211 -534
- data/stdlib/nkf/0/nkf.rbs +5 -5
- data/stdlib/objspace/0/objspace.rbs +31 -14
- data/stdlib/openssl/0/openssl.rbs +11 -7
- data/stdlib/optparse/0/optparse.rbs +20 -17
- data/stdlib/pathname/0/pathname.rbs +21 -4
- data/stdlib/pstore/0/pstore.rbs +378 -154
- data/stdlib/pty/0/pty.rbs +24 -8
- data/stdlib/ripper/0/ripper.rbs +1650 -0
- data/stdlib/socket/0/addrinfo.rbs +9 -15
- data/stdlib/socket/0/socket.rbs +36 -3
- data/stdlib/strscan/0/string_scanner.rbs +7 -5
- data/stdlib/tempfile/0/tempfile.rbs +104 -44
- data/stdlib/time/0/time.rbs +2 -2
- data/stdlib/uri/0/file.rbs +5 -0
- data/stdlib/uri/0/generic.rbs +2 -2
- data/stdlib/yaml/0/yaml.rbs +2 -2
- data/stdlib/zlib/0/zlib.rbs +1 -1
- metadata +8 -6
- data/core/deprecated.rbs +0 -9
- data/sig/shims/ripper.rbs +0 -8
data/core/thread.rbs
CHANGED
@@ -817,6 +817,15 @@ class Thread < Object
|
|
817
817
|
#
|
818
818
|
def self.abort_on_exception=: (untyped abort_on_exception) -> untyped
|
819
819
|
|
820
|
+
# <!--
|
821
|
+
# rdoc-file=vm_backtrace.c
|
822
|
+
# - Thread.each_caller_location{ |loc| ... } -> nil
|
823
|
+
# -->
|
824
|
+
# Yields each frame of the current execution stack as a backtrace location
|
825
|
+
# object.
|
826
|
+
#
|
827
|
+
def self.each_caller_location: () { (Backtrace::Location) -> void } -> nil
|
828
|
+
|
820
829
|
# Wraps the block in a single, VM-global
|
821
830
|
# [Mutex\#synchronize](https://ruby-doc.org/core-2.6.3/Mutex.html#method-i-synchronize)
|
822
831
|
# , returning the value of the block. A thread executing inside the
|
@@ -1173,10 +1182,10 @@ end
|
|
1173
1182
|
class Thread::Backtrace < Object
|
1174
1183
|
# <!--
|
1175
1184
|
# rdoc-file=vm_backtrace.c
|
1176
|
-
# -
|
1185
|
+
# - Thread::Backtrace::limit -> integer
|
1177
1186
|
# -->
|
1178
1187
|
# Returns maximum backtrace length set by `--backtrace-limit` command-line
|
1179
|
-
# option. The
|
1188
|
+
# option. The default is `-1` which means unlimited backtraces. If the value is
|
1180
1189
|
# zero or positive, the error backtraces, produced by Exception#full_message,
|
1181
1190
|
# are abbreviated and the extra lines are replaced by `... 3 levels... `
|
1182
1191
|
#
|
@@ -1570,12 +1579,10 @@ class Thread::Queue < Object
|
|
1570
1579
|
#
|
1571
1580
|
def closed?: () -> bool
|
1572
1581
|
|
1573
|
-
# <!--
|
1574
|
-
#
|
1575
|
-
#
|
1576
|
-
#
|
1577
|
-
# onto the queue. If `non_block` is true, the thread isn't suspended, and
|
1578
|
-
# `ThreadError` is raised.
|
1582
|
+
# <!--
|
1583
|
+
# rdoc-file=thread_sync.rb
|
1584
|
+
# - deq(non_block = false, timeout: nil)
|
1585
|
+
# -->
|
1579
1586
|
#
|
1580
1587
|
alias deq pop
|
1581
1588
|
|
@@ -1610,10 +1617,8 @@ class Thread::Queue < Object
|
|
1610
1617
|
def num_waiting: () -> Integer
|
1611
1618
|
|
1612
1619
|
# <!--
|
1613
|
-
# rdoc-file=thread_sync.
|
1614
|
-
# - pop(non_block=false)
|
1615
|
-
# - deq(non_block=false)
|
1616
|
-
# - shift(non_block=false)
|
1620
|
+
# rdoc-file=thread_sync.rb
|
1621
|
+
# - pop(non_block=false, timeout: nil)
|
1617
1622
|
# -->
|
1618
1623
|
# Retrieves data from the queue.
|
1619
1624
|
#
|
@@ -1621,7 +1626,10 @@ class Thread::Queue < Object
|
|
1621
1626
|
# onto the queue. If `non_block` is true, the thread isn't suspended, and
|
1622
1627
|
# `ThreadError` is raised.
|
1623
1628
|
#
|
1624
|
-
|
1629
|
+
# If `timeout` seconds have passed and no data is available `nil` is returned.
|
1630
|
+
# If `timeout` is `0` it returns immediately.
|
1631
|
+
#
|
1632
|
+
def pop: (?boolish non_block, ?timeout: _ToF?) -> untyped
|
1625
1633
|
|
1626
1634
|
# <!--
|
1627
1635
|
# rdoc-file=thread_sync.c
|
@@ -1633,12 +1641,10 @@ class Thread::Queue < Object
|
|
1633
1641
|
#
|
1634
1642
|
def push: (untyped obj) -> void
|
1635
1643
|
|
1636
|
-
# <!--
|
1637
|
-
#
|
1638
|
-
#
|
1639
|
-
#
|
1640
|
-
# onto the queue. If `non_block` is true, the thread isn't suspended, and
|
1641
|
-
# `ThreadError` is raised.
|
1644
|
+
# <!--
|
1645
|
+
# rdoc-file=thread_sync.rb
|
1646
|
+
# - shift(non_block = false, timeout: nil)
|
1647
|
+
# -->
|
1642
1648
|
#
|
1643
1649
|
alias shift pop
|
1644
1650
|
|
@@ -1655,21 +1661,17 @@ end
|
|
1655
1661
|
# See Thread::Queue for an example of how a Thread::SizedQueue works.
|
1656
1662
|
#
|
1657
1663
|
class Thread::SizedQueue < Thread::Queue
|
1658
|
-
# <!--
|
1659
|
-
#
|
1660
|
-
#
|
1661
|
-
#
|
1662
|
-
# unless `non_block` is true. If `non_block` is true, the thread isn't
|
1663
|
-
# suspended, and `ThreadError` is raised.
|
1664
|
+
# <!--
|
1665
|
+
# rdoc-file=thread_sync.rb
|
1666
|
+
# - <<(object, non_block = false, timeout: nil)
|
1667
|
+
# -->
|
1664
1668
|
#
|
1665
1669
|
alias << push
|
1666
1670
|
|
1667
|
-
# <!--
|
1668
|
-
#
|
1669
|
-
#
|
1670
|
-
#
|
1671
|
-
# unless `non_block` is true. If `non_block` is true, the thread isn't
|
1672
|
-
# suspended, and `ThreadError` is raised.
|
1671
|
+
# <!--
|
1672
|
+
# rdoc-file=thread_sync.rb
|
1673
|
+
# - enq(object, non_block = false, timeout: nil)
|
1674
|
+
# -->
|
1673
1675
|
#
|
1674
1676
|
alias enq push
|
1675
1677
|
|
@@ -1698,9 +1700,9 @@ class Thread::SizedQueue < Thread::Queue
|
|
1698
1700
|
def max=: (Integer max) -> void
|
1699
1701
|
|
1700
1702
|
# <!--
|
1701
|
-
# rdoc-file=thread_sync.
|
1702
|
-
# - push(object, non_block=false)
|
1703
|
-
# - enq(object, non_block=false)
|
1703
|
+
# rdoc-file=thread_sync.rb
|
1704
|
+
# - push(object, non_block=false, timeout: nil)
|
1705
|
+
# - enq(object, non_block=false, timeout: nil)
|
1704
1706
|
# - <<(object)
|
1705
1707
|
# -->
|
1706
1708
|
# Pushes `object` to the queue.
|
@@ -1709,7 +1711,10 @@ class Thread::SizedQueue < Thread::Queue
|
|
1709
1711
|
# unless `non_block` is true. If `non_block` is true, the thread isn't
|
1710
1712
|
# suspended, and `ThreadError` is raised.
|
1711
1713
|
#
|
1712
|
-
|
1714
|
+
# If `timeout` seconds have passed and no space is available `nil` is returned.
|
1715
|
+
# If `timeout` is `0` it returns immediately. Otherwise it returns `self`.
|
1716
|
+
#
|
1717
|
+
def push: (untyped obj, ?boolish non_block, timeout: _ToF?) -> void
|
1713
1718
|
end
|
1714
1719
|
|
1715
1720
|
ConditionVariable: singleton(Thread::ConditionVariable)
|