Skip to content

Commit 0e3767c

Browse files
authored
Merge branch 'master' into bundle-update-20251209-a378cd98
2 parents c953f72 + 83e246b commit 0e3767c

21 files changed

+780
-83
lines changed

core/fiber.rbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,8 @@ class Fiber < Object
425425
#
426426
# See Kernel#raise for more information.
427427
#
428-
def raise: (?string msg) -> untyped
429-
| (_Exception, ?string msg, ?Array[string] | Array[Thread::Backtrace::Location] | nil backtrace) -> untyped
428+
def raise: (?string msg, ?cause: Exception?) -> untyped
429+
| (_Exception, ?string msg, ?Array[string] | Array[Thread::Backtrace::Location] | nil backtrace, ?cause: Exception?) -> untyped
430430

431431
# <!--
432432
# rdoc-file=cont.c

core/file.rbs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,12 +1839,12 @@ class File < IO
18391839
# Returns `false` if `File::LOCK_NB` is specified and the operation would have
18401840
# blocked;
18411841
# otherwise returns `0`.
1842-
# Constant | Lock | Effect
1843-
# ---------------|------------|--------------------------------------------------------------------------------------------------------------
1844-
# +File::LOCK_EX+| Exclusive | Only one process may hold an exclusive lock for +self+ at a time.
1845-
# +File::LOCK_NB+|Non-blocking|No blocking; may be combined with +File::LOCK_SH+ or +File::LOCK_EX+ using the bitwise OR operator <tt>|</tt>.
1846-
# +File::LOCK_SH+| Shared | Multiple processes may each hold a shared lock for +self+ at the same time.
1847-
# +File::LOCK_UN+| Unlock | Remove an existing lock held by this process.
1842+
# Constant | Lock | Effect
1843+
# ---------------|------------|-------------------------------------------------------------------------------------------------------
1844+
# `File::LOCK_EX`| Exclusive | Only one process may hold an exclusive lock for `self` at a time.
1845+
# `File::LOCK_NB`|Non-blocking|No blocking; may be combined with `File::LOCK_SH` or `File::LOCK_EX` using the bitwise OR operator `|`.
1846+
# `File::LOCK_SH`| Shared | Multiple processes may each hold a shared lock for `self` at the same time.
1847+
# `File::LOCK_UN`| Unlock | Remove an existing lock held by this process.
18481848
# Example:
18491849
# # Update a counter using an exclusive lock.
18501850
# # Don't use File::WRONLY because it truncates the file.

core/kernel.rbs

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,58 +1779,58 @@ module Kernel : BasicObject
17791779
# * Each of these tests operates only on the entity at `path0`,
17801780
# and returns `true` or `false`;
17811781
# for a non-existent entity, returns `false` (does not raise exception):
1782-
# Character |Test
1783-
# ------------|-------------------------------------------------------------------------
1784-
# <tt>'b'</tt>|Whether the entity is a block device.
1785-
# <tt>'c'</tt>|Whether the entity is a character device.
1786-
# <tt>'d'</tt>|Whether the entity is a directory.
1787-
# <tt>'e'</tt>|Whether the entity is an existing entity.
1788-
# <tt>'f'</tt>|Whether the entity is an existing regular file.
1789-
# <tt>'g'</tt>|Whether the entity's setgid bit is set.
1790-
# <tt>'G'</tt>|Whether the entity's group ownership is equal to the caller's.
1791-
# <tt>'k'</tt>|Whether the entity's sticky bit is set.
1792-
# <tt>'l'</tt>|Whether the entity is a symbolic link.
1793-
# <tt>'o'</tt>|Whether the entity is owned by the caller's effective uid.
1794-
# <tt>'O'</tt>|Like <tt>'o'</tt>, but uses the real uid (not the effective uid).
1795-
# <tt>'p'</tt>|Whether the entity is a FIFO device (named pipe).
1796-
# <tt>'r'</tt>|Whether the entity is readable by the caller's effective uid/gid.
1797-
# <tt>'R'</tt>|Like <tt>'r'</tt>, but uses the real uid/gid (not the effective uid/gid).
1798-
# <tt>'S'</tt>|Whether the entity is a socket.
1799-
# <tt>'u'</tt>|Whether the entity's setuid bit is set.
1800-
# <tt>'w'</tt>|Whether the entity is writable by the caller's effective uid/gid.
1801-
# <tt>'W'</tt>|Like <tt>'w'</tt>, but uses the real uid/gid (not the effective uid/gid).
1802-
# <tt>'x'</tt>|Whether the entity is executable by the caller's effective uid/gid.
1803-
# <tt>'X'</tt>|Like <tt>'x'</tt>, but uses the real uid/gid (not the effective uid/git).
1804-
# <tt>'z'</tt>|Whether the entity exists and is of length zero.
1782+
# Character|Test
1783+
# ---------|-------------------------------------------------------------------
1784+
# `'b'` |Whether the entity is a block device.
1785+
# `'c'` |Whether the entity is a character device.
1786+
# `'d'` |Whether the entity is a directory.
1787+
# `'e'` |Whether the entity is an existing entity.
1788+
# `'f'` |Whether the entity is an existing regular file.
1789+
# `'g'` |Whether the entity's setgid bit is set.
1790+
# `'G'` |Whether the entity's group ownership is equal to the caller's.
1791+
# `'k'` |Whether the entity's sticky bit is set.
1792+
# `'l'` |Whether the entity is a symbolic link.
1793+
# `'o'` |Whether the entity is owned by the caller's effective uid.
1794+
# `'O'` |Like `'o'`, but uses the real uid (not the effective uid).
1795+
# `'p'` |Whether the entity is a FIFO device (named pipe).
1796+
# `'r'` |Whether the entity is readable by the caller's effective uid/gid.
1797+
# `'R'` |Like `'r'`, but uses the real uid/gid (not the effective uid/gid).
1798+
# `'S'` |Whether the entity is a socket.
1799+
# `'u'` |Whether the entity's setuid bit is set.
1800+
# `'w'` |Whether the entity is writable by the caller's effective uid/gid.
1801+
# `'W'` |Like `'w'`, but uses the real uid/gid (not the effective uid/gid).
1802+
# `'x'` |Whether the entity is executable by the caller's effective uid/gid.
1803+
# `'X'` |Like `'x'`, but uses the real uid/gid (not the effective uid/git).
1804+
# `'z'` |Whether the entity exists and is of length zero.
18051805
# * This test operates only on the entity at `path0`,
18061806
# and returns an integer size or `nil`:
1807-
# Character |Test
1808-
# ------------|--------------------------------------------------------------------------------------------
1809-
# <tt>'s'</tt>|Returns positive integer size if the entity exists and has non-zero length, +nil+ otherwise.
1807+
# Character|Test
1808+
# ---------|--------------------------------------------------------------------------------------------
1809+
# `'s'` |Returns positive integer size if the entity exists and has non-zero length, `nil` otherwise.
18101810
# * Each of these tests operates only on the entity at `path0`,
18111811
# and returns a Time object;
18121812
# raises an exception if the entity does not exist:
1813-
# Character |Test
1814-
# ------------|--------------------------------------
1815-
# <tt>'A'</tt>|Last access time for the entity.
1816-
# <tt>'C'</tt>|Last change time for the entity.
1817-
# <tt>'M'</tt>|Last modification time for the entity.
1813+
# Character|Test
1814+
# ---------|--------------------------------------
1815+
# `'A'` |Last access time for the entity.
1816+
# `'C'` |Last change time for the entity.
1817+
# `'M'` |Last modification time for the entity.
18181818
# * Each of these tests operates on the modification time (`mtime`)
18191819
# of each of the entities at `path0` and `path1`,
18201820
# and returns a `true` or `false`;
18211821
# returns `false` if either entity does not exist:
1822-
# Character |Test
1823-
# ------------|------------------------------------------------------------------------------------------------
1824-
# <tt>'<'</tt>|Whether the <code>mtime</code> at <code>path0</code> is less than that at <code>path1</code>.
1825-
# <tt>'='</tt>|Whether the <code>mtime</code> at <code>path0</code> is equal to that at <code>path1</code>.
1826-
# <tt>'>'</tt>|Whether the <code>mtime</code> at <code>path0</code> is greater than that at <code>path1</code>.
1822+
# Character|Test
1823+
# ---------|---------------------------------------------------------------
1824+
# `'<'` |Whether the `mtime` at `path0` is less than that at `path1`.
1825+
# `'='` |Whether the `mtime` at `path0` is equal to that at `path1`.
1826+
# `'>'` |Whether the `mtime` at `path0` is greater than that at `path1`.
18271827
# * This test operates on the content of each of the entities at `path0` and
18281828
# `path1`,
18291829
# and returns a `true` or `false`;
18301830
# returns `false` if either entity does not exist:
1831-
# Character |Test
1832-
# ------------|---------------------------------------------
1833-
# <tt>'-'</tt>|Whether the entities exist and are identical.
1831+
# Character|Test
1832+
# ---------|---------------------------------------------
1833+
# `'-'` |Whether the entities exist and are identical.
18341834
#
18351835
def self?.test: (String | Integer cmd, String | IO file1, ?String | IO file2) -> (TrueClass | FalseClass | Time | nil | Integer)
18361836

core/math.rbs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,27 @@ module Math
410410
#
411411
def self.exp: (double x) -> Float
412412

413+
# <!--
414+
# rdoc-file=math.c
415+
# - Math.expm1(x) -> float
416+
# -->
417+
# Returns "exp(x) - 1", `e` raised to the `x` power, minus 1.
418+
#
419+
# * Domain: `[-INFINITY, INFINITY]`.
420+
# * Range: `[-1.0, INFINITY]`.
421+
#
422+
# Examples:
423+
#
424+
# expm1(-INFINITY) # => 0.0
425+
# expm1(-1.0) # => -0.6321205588285577 # 1.0/E - 1
426+
# expm1(0.0) # => 0.0
427+
# expm1(0.5) # => 0.6487212707001282 # sqrt(E) - 1
428+
# expm1(1.0) # => 1.718281828459045 # E - 1
429+
# expm1(2.0) # => 6.38905609893065 # E**2 - 1
430+
# expm1(INFINITY) # => Infinity
431+
#
432+
def self.expm1: (double x) -> Float
433+
413434
# <!--
414435
# rdoc-file=math.c
415436
# - Math.frexp(x) -> [fraction, exponent]
@@ -602,6 +623,25 @@ module Math
602623
#
603624
def self.log10: (double x) -> Float
604625

626+
# <!--
627+
# rdoc-file=math.c
628+
# - Math.log1p(x) -> float
629+
# -->
630+
# Returns "log(x + 1)", the base E
631+
# [logarithm](https://en.wikipedia.org/wiki/Logarithm) of (`x` + 1).
632+
#
633+
# * Domain: `[-1, INFINITY]`.
634+
# * Range: `[-INFINITY, INFINITY]`.
635+
#
636+
# Examples:
637+
#
638+
# log1p(-1.0) # => -Infinity
639+
# log1p(0.0) # => 0.0
640+
# log1p(E - 1) # => 1.0
641+
# log1p(INFINITY) # => Infinity
642+
#
643+
def self.log1p: (double x) -> Float
644+
605645
# <!--
606646
# rdoc-file=math.c
607647
# - Math.log2(x) -> float

core/object_space.rbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ module ObjectSpace
2929
# - _id2ref(p1)
3030
# -->
3131
#
32+
%a{deprecated}
3233
def self._id2ref: (Integer id) -> untyped
3334

3435
# <!--

0 commit comments

Comments
 (0)