Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ Note that each entry is kept to a minimum, see links for details.

Note: We're only listing outstanding class updates.

* Kernel

* `Kernel#autoload_relative` and `Module#autoload_relative` are added.
These methods work like `autoload`, but resolve the file path relative
to the file where the method is called, similar to `require_relative`.
This makes it easier to autoload constants from files in the same
directory without hardcoding absolute paths or manipulating `$LOAD_PATH`.
[[Feature #15330]]

* Method

* `Method#source_location`, `Proc#source_location`, and
Expand All @@ -19,6 +28,8 @@ Note: We're only listing outstanding class updates.
end_line, end_column]`. The previous 2-element format `[path,
line]` can still be obtained by calling `.take(2)` on the result.
[[Feature #6012]]
* `Array#pack` accepts a new format `R` and `r` for unpacking unsigned
and signed LEB128 encoded integers. [[Feature #21785]]

* Set

Expand Down Expand Up @@ -90,4 +101,6 @@ A lot of work has gone into making Ractors more stable, performant, and usable.
## JIT

[Feature #6012]: https://bugs.ruby-lang.org/issues/6012
[Feature #15330]: https://bugs.ruby-lang.org/issues/15330
[Feature #21390]: https://bugs.ruby-lang.org/issues/21390
[Feature #21785]: https://bugs.ruby-lang.org/issues/21785
7 changes: 7 additions & 0 deletions doc/language/packed_data.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ These tables summarize the directives for packing and unpacking.

U | UTF-8 character
w | BER-compressed integer
R | LEB128 encoded unsigned integer
r | LEB128 encoded signed integer

=== For Floats

Expand Down Expand Up @@ -98,6 +100,7 @@ These tables summarize the directives for packing and unpacking.
@ | skip to the offset given by the length argument
X | skip backward one byte
x | skip forward one byte
^ | return the current offset

== Packing and Unpacking

Expand Down Expand Up @@ -720,3 +723,7 @@ for one byte in the input or output string.
"\x00\x00\x02".unpack("CxC") # => [0, 2]
"\x00\x00\x02".unpack("x3C") # => [nil]
"\x00\x00\x02".unpack("x4C") # Raises ArgumentError

- <tt>'^'</tt> - Only for unpacking; the current position:

"foo\0\0\0".unpack("Z*C") # => ["foo", 6]
162 changes: 0 additions & 162 deletions ext/monitor/depend

This file was deleted.

2 changes: 0 additions & 2 deletions ext/monitor/extconf.rb

This file was deleted.

Loading