You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### `Thread::Queue#freeze` and `SizedQueue#freeze` raise `TypeError`[](#threadqueuefreeze-and-sizedqueuefreeze-raise-typeerror)
434
432
@@ -731,7 +729,6 @@ A new warning category was introduced for a code that is correct but is known to
731
729
* The warning category should be turned on explicitly by providing `-W:performance` CLI option or `Warning[:performance] = true` from the program.
732
730
***Additional reading:**[Performance impact of the memoization idiom on modern Ruby](https://railsatscale.com/2023-10-24-memoization-pattern-and-object-shapes/) by Ruby core team member Jean Boussier.
733
731
734
-
735
732
#### `Process.warmup`[](#processwarmup)
736
733
737
734
A method to call when a long-running application finalized its loading, and before the regular work is started. TODO: forks?
@@ -766,7 +763,6 @@ Allows to trace when some exception was `rescue`'d in the code of interest.
766
763
```
767
764
***Notes:** The event-specific attribute for the event is the same as for `:raise`: <aclass="ruby-doc"href="https://docs.ruby-lang.org/en/master/TracePoint.html#method-i-raised_exception"><code>#raised_exception</code></a>.
768
765
769
-
770
766
## Standard library[](#standard-library)
771
767
772
768
Since Ruby 3.1 release, most of the standard library is extracted to either _default_ or _bundled_ gems; their development happens in separate repositories, and changelogs are either maintained there, or absent altogether. Either way, their changes aren't mentioned in the combined Ruby changelog, and I'll not be trying to follow all of them.
#### `Thread::Queue#freeze` and `SizedQueue#freeze` raise `TypeError`
434
432
@@ -731,7 +729,6 @@ A new warning category was introduced for a code that is correct but is known to
731
729
* The warning category should be turned on explicitly by providing `-W:performance` CLI option or `Warning[:performance] = true` from the program.
732
730
***Additional reading:**[Performance impact of the memoization idiom on modern Ruby](https://railsatscale.com/2023-10-24-memoization-pattern-and-object-shapes/) by Ruby core team member Jean Boussier.
733
731
734
-
735
732
#### `Process.warmup`
736
733
737
734
A method to call when a long-running application finalized its loading, and before the regular work is started. TODO: forks?
@@ -766,7 +763,6 @@ Allows to trace when some exception was `rescue`'d in the code of interest.
766
763
```
767
764
***Notes:** The event-specific attribute for the event is the same as for `:raise`: [#raised_exception](https://docs.ruby-lang.org/en/master/TracePoint.html#method-i-raised_exception).
768
765
769
-
770
766
## Standard library
771
767
772
768
Since Ruby 3.1 release, most of the standard library is extracted to either _default_ or _bundled_ gems; their development happens in separate repositories, and changelogs are either maintained there, or absent altogether. Either way, their changes aren't mentioned in the combined Ruby changelog, and I'll not be trying to follow all of them.
Copy file name to clipboardExpand all lines: _src/evolution.md
+37-3Lines changed: 37 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -266,6 +266,8 @@ end
266
266
classHTTP
267
267
end
268
268
```
269
+
*[3.3](3.3.md#moduleset_temporary_name)[Module#set_temporary_name](https://docs.ruby-lang.org/en/master/Module.html#method-i-set_temporary_name) to set a human-readable name for a module without assigning it to a constant.
270
+
269
271
270
272
<!--
271
273
* **2.0** `#define_method` accepts a UnboundMethod from a Module.
@@ -386,6 +388,7 @@ This section lists changes in how methods are defined and invoked, as well as ne
386
388
[1, 2, 3].map { _1 * 100 } # => 100, 200, 300
387
389
```
388
390
* [3.2](3.2.md#procparameters-new-keyword-argument-lambda-truefalse) [Proc#parameters](https://docs.ruby-lang.org/en/3.2/Proc.html#method-i-parameters): new keyword argument `lambda: true/false`, improving introspection of whether arguments have default values or they are just optional because all `proc` arguments are.
391
+
* [3.3](3.3.md#standalone-it-in-blocks-will-become-anonymous-argument-in-ruby-34) Added a warning that since 3.4, `it` would become a synonym for `_1`.
389
392
390
393
<!--
391
394
***2.1**Returning from lambdaproc now always exits from the Proc, not from the method where the lambda is created. Returning from non-lambdaproc exits from the method, same as the former behavior.
@@ -394,6 +397,8 @@ This section lists changes in how methods are defined and invoked, as well as ne
394
397
* [3.0](3.0.md#kernellambda-warns-if-called-without-a-literal-block) `Kernel#lambda` warns if called without a literal block (—)
395
398
* [3.0](3.0.md#proc-and-eql) Procs/lambdas: `Proc#==` and `#eql?` ([Proc#==](https://docs.ruby-lang.org/en/3.0.0/Proc.html#method-i-3D-3D))
396
399
* [3.2](3.2.md#procdup-returns-an-instance-of-subclass) Core classes and modules: Procs and methods: `Proc#dup` returns an instance of subclass (—)
400
+
* [3.3](3.3.md#kernellambda-raises-when-passed-proc-instance) Core classes and modules: `Kernel#lambda` raises when passed `Proc` instance ([Kernel#lambda](https://docs.ruby-lang.org/en/master/Kernel.html#method-i-lambda) _(no specific details are provided, though)_)
401
+
* [3.3](3.3.md#procdup-and-clone-call-initialize_dup-and-initialize_copy) Core classes and modules: `Proc#dup` and `#clone` call `#initialize_dup` and `#initialize_copy` (— (Adheres to the behavior described for [Object#dup](https://docs.ruby-lang.org/en/master/Object.html#method-i-dup) and [#clone](https://docs.ruby-lang.org/en/master/Kernel.html#method-i-clone)))
397
402
-->
398
403
399
404
## `Comparable`
@@ -511,13 +516,17 @@ Included in many classes to implement comparison methods. Once class defines a m
* [3.3](3.3.md#stringbytesplice-new-arguments-to-select-a-portion-of-the-replacement-string) [String#bytesplice](https://docs.ruby-lang.org/en/master/String.html#method-i-bytesplice): additional arguments to select a portion of the inserted string.
* [3.3](3.3.md#arraypack-and-stringunpack-raise-argumenterror-for-unknown-directives) Core classes and modules: `Array#pack` and `String#unpack`: raise `ArgumentError` for unknown directives ([doc/packed_data.rdoc](https://docs.ruby-lang.org/en/master/packed_data_rdoc.html))
521
530
-->
522
531
523
532
## `Struct`
@@ -581,6 +590,7 @@ Included in many classes to implement comparison methods. Once class defines a m
581
590
* **2.0** `Time#to_s` now returns US-ASCII encoding instead of BINARY.
582
591
* [2.7](2.7.md#inspect-includes-subseconds) `Time#inspect` includes subseconds ([Time#inspect](https://ruby-doc.org/core-2.7.0/Time.html#method-i-inspect))
* [3.3](3.3.md#timenew-with-string-argument-became-stricter) Core classes and modules: `Time.new` with string argument became stricter ([Time#new](https://docs.ruby-lang.org/en/master/Time.html#method-c-new))
584
594
-->
585
595
586
596
## Enumerables, collections, and iteration
@@ -698,6 +708,9 @@ Included in many classes to implement comparison methods. Once class defines a m
698
708
```
699
709
*[2.6](2.6.md#rangecover-accepts-range-argument)[#cover?](https://docs.ruby-lang.org/en/2.6.0/Range.html#method-i-cover-3F) accepts range argument
*[3.3](3.3.md#reverse_each)[Range#reverse_each](https://docs.ruby-lang.org/en/master/Range.html#method-i-reverse_each) (specialized form of `Enumerable#reverse_each`)
* [2.7](2.7.md#for-string) `#===` for `String` ([Range#===](https://ruby-doc.org/core-2.7.0/Range.html#method-i-3D-3D-3D))
@@ -792,6 +805,11 @@ Included in many classes to implement comparison methods. Once class defines a m
792
805
*[2.7](2.7.md#objectspaceweakmap-now-accepts-non-gc-able-objects)[ObjectSpace::WeakMap#[]=](https://ruby-doc.org/core-2.7.0/ObjectSpace/WeakMap.html#method-i-5B-5D-3D) now accepts non-GC-able objects
793
806
*[3.1](3.1.md#threadqueueinitialize-initial-values-can-be-passed-to-initializer)[Thread::Queue.new](https://docs.ruby-lang.org/en/3.1/Thread/Queue.html#method-c-new) allows initial queue content to be passed
794
807
*[3.2](3.2.md#threadqueue-timeouts-for-pop-and-push)[Thread::Queue#pop](https://docs.ruby-lang.org/en/3.2/Thread/Queue.html#method-i-pop), [Thread::SizedQueue#pop](https://docs.ruby-lang.org/en/3.2/Thread/SizedQueue.html#method-i-pop), and [Thread::SizedQueue#push](https://docs.ruby-lang.org/en/3.2/Thread/SizedQueue.html#method-i-push) have `timeout:` argument.
*[3.3](3.3.md#threadqueuefreeze-and-sizedqueuefreeze-raise-typeerror)[Thread::Queue#freeze](https://docs.ruby-lang.org/en/master/Thread/Queue.html#method-i-freeze) and [Thread::SizedQueue#freeze](https://docs.ruby-lang.org/en/master/Thread/SizedQueue.html#method-i-freeze) raise `TypeError`.
811
+
812
+
795
813
796
814
## Filesystem and IO
797
815
@@ -821,6 +839,10 @@ Included in many classes to implement comparison methods. Once class defines a m
821
839
*[3.1](3.1.md#iobuffer)**[IO::Buffer](https://docs.ruby-lang.org/en/3.1/IO/Buffer.html) low-level class introduced**
822
840
*[3.2](3.2.md#io-support-for-timeouts-for-blocking-io) Support for timeouts for blocking IO via [IO#timeout=](https://docs.ruby-lang.org/en/3.2/IO.html#method-i-timeout-3D).
823
841
*[3.2](3.2.md#iopath) Generic [IO#path](https://docs.ruby-lang.org/en/3.2/IO.html#method-i-path) that can be assigned on [creation](https://docs.ruby-lang.org/en/3.2/IO.html#class-IO-label-Open+Options).
842
+
*[3.3](3.3.md#dirfor_fd-and-dirfchdir)[Dir.for_fd](https://docs.ruby-lang.org/en/master/Dir.html#method-c-for_fd) and [Dir.fchdir](https://docs.ruby-lang.org/en/master/Dir.html#method-c-fchdir).
*[3.3](3.3.md#deprecate-subprocess-creation-with-method-dedicated-to-files) Create subprocesses with `IO.read('| command')` and similar methods is deprecated.
845
+
824
846
825
847
<!--
826
848
* **2.0** `File.fnmatch?` now expands braces in the pattern if File::FNM_EXTGLOB option is given.
@@ -882,6 +904,7 @@ This section covers exception raising/handling behavior changes, as well as chan
882
904
* [2.5](2.5.md#backtrace-and-error-message-in-reverse-order) Backtrace and error message are (experimentally) displayed in a reverse order.
* [3.0](3.0.md#exception-output-order-is-changed----again) Exception output order is changed -- again (—)
907
+
* [3.3](3.3.md#nomethoderror-change-of-rendering-logic) Core classes and modules: `NoMethodError`: change of rendering logic ([NoMethodError](https://docs.ruby-lang.org/en/master/NoMethodError.html))
885
908
-->
886
909
887
910
### Warnings
@@ -892,6 +915,8 @@ This section covers exception raising/handling behavior changes, as well as chan
892
915
*[2.5](2.5.md#warn-uplevel-keyword-argument)[Kernel#warn](https://ruby-doc.org/core-2.6/Kernel.html#method-i-warn): `uplevel:` keyword argument allows to tune which line to specify in warning message as a source of warning
893
916
*[2.7](2.7.md#warning-and-)[Warning::[]](https://ruby-doc.org/core-2.7.0/Warning.html#method-c-5B-5D) and [Warning::[]=](https://ruby-doc.org/core-2.7.0/Warning.html#method-c-5B-5D-3D) to choose which categories of warnings to show; the categories are predefined by Ruby and only can be `:deprecated` or `:experimental` (or none)
894
917
* <spanclass="ruby-version">[3.0](3.0.md#warningwarn-category-keyword-argument)</span> User code allowed to specify category of its warnings with [Kernel#warn](https://docs.ruby-lang.org/en/3.0.0/Kernel.html#method-i-warn) and intercept the warning category [Warning#warn](https://docs.ruby-lang.org/en/3.0.0/Warning.html#method-i-warn) with `category:` keyword argument; the list of categories is still closed.
918
+
*[3.3](3.3.md#new-warning-category-performance) New `Warning`[category](https://docs.ruby-lang.org/en/master/Warning.html#method-c-5B-5D): `:performance`.
919
+
895
920
896
921
## Concurrency and parallelism
897
922
@@ -915,9 +940,12 @@ This section covers exception raising/handling behavior changes, as well as chan
915
940
***2.1**[.clock_gettime](https://docs.ruby-lang.org/en/2.1.0/Process.html#method-c-clock_gettime) and [.clock_getres](https://docs.ruby-lang.org/en/2.1.0/Process.html#method-c-clock_getres)
916
941
*[2.5](2.5.md#processlast_status-as-an-alias-of-)[Process.last_status](https://ruby-doc.org/core-2.5.0/Process.html#method-c-last_status) as an alias of `$?`
* **2.2** Process execution methods such as [.spawn](https://docs.ruby-lang.org/en/2.2.0/Process.html#method-c-spawn) opens the file in write mode for redirect from `[:out, :err]`.
948
+
* [3.3](3.3.md#processstatus--and--are-deprecated) Core classes and modules: Internals: `Process::Status#&` and `#>>` are deprecated ([Process::Status#&](https://docs.ruby-lang.org/en/master/Process/Status.html#method-i-26), [#>>](https://docs.ruby-lang.org/en/master/Process/Status.html#method-i-3E-3E))
921
949
-->
922
950
923
951
### `Fiber`
@@ -931,6 +959,8 @@ This section covers exception raising/handling behavior changes, as well as chan
*[3.0](3.0.md#fiberbacktrace--backtrace_locations)[#backtrace](https://docs.ruby-lang.org/en/3.0.0/Fiber.html#method-i-backtrace) and [#backtrace_locations](https://docs.ruby-lang.org/en/3.0.0/Fiber.html#method-i-backtrace_locations)
933
961
*[3.2](3.2.md#fiber-storage)**Storage concept**: [.[]](https://docs.ruby-lang.org/en/3.2/Fiber.html#method-c-5B-5D), [.[]=](https://docs.ruby-lang.org/en/3.2/Fiber.html#method-c-5B-5D-3D), [#storage](https://docs.ruby-lang.org/en/3.2/Fiber.html#method-i-storage), and [#storage=](https://docs.ruby-lang.org/en/3.2/Fiber.html#method-i-storage-3D)
*[3.2](3.2.md#tracepointbinding-returns-nil-for-c_callc_return)[TracePoint#binding](https://docs.ruby-lang.org/en/3.2/TracePoint.html#method-i-binding) returns `nil` for `c_call`/`c_return`
1000
1030
*[3.2](3.2.md#tracepoint-for-block-default-to-trace-the-current-thread)[TracePoint#enable](https://docs.ruby-lang.org/en/3.2/TracePoint.html#method-i-enable) with a block default to trace the current thread.
@@ -1052,8 +1084,10 @@ Refinements are hygienic replacement for reopening of classes and modules. They
1052
1084
*[2.7](2.7.md#refinements-in-methodinstance_method) Refined methods are achievable with `#method`/`#instance_method`
1053
1085
*[3.1](3.1.md#refinement-class)**[Refinement](https://docs.ruby-lang.org/en/3.1/Refinement.html) class** representing the `self` inside the `refine` statement. In particular, new method [#import_methods](https://docs.ruby-lang.org/en/3.1/Refinement.html#method-i-import_methods) became available inside `#refine` providing some (incomplete) remedy for inability to `#include` modules while refining some class.
1054
1086
*[3.2](3.2.md#modulerefinements)[Module#refinements](https://docs.ruby-lang.org/en/3.2/Module.html#method-i-refinements) to introspect which refinements some module defines;
1055
-
*[3.2](3.2.md#refinementrefined_class)[Refinement#refined_class](https://docs.ruby-lang.org/en/3.2/Refinement.html#method-i-refined_class) to see what class/module they refine; and
1056
-
*[3.2](3.2.md#moduleused_refinements)[Module.used_refinements](https://docs.ruby-lang.org/en/3.2/Module.html#method-c-used_refinements) to check which refinements are active in the current context.
1087
+
*[3.2](3.2.md#moduleused_refinements)[Module.used_refinements](https://docs.ruby-lang.org/en/3.2/Module.html#method-c-used_refinements) to check which refinements are active in the current context; and
1088
+
*[3.2](3.2.md#refinementrefined_class)[Refinement#refined_class](https://docs.ruby-lang.org/en/3.2/Refinement.html#method-i-refined_class) to see what class/module they refine.
1089
+
*[3.3](3.3.md#refinementrefined_class-is-renamed-to-refinementtarget)`Refinement#refined_class` is renamed to [Refinement#target](https://docs.ruby-lang.org/en/master/Refinement.html#method-i-target).
1090
+
1057
1091
1058
1092
### Freezing
1059
1093
@@ -1093,4 +1127,4 @@ Freezing of object makes its state immutable. The important thing about freezing
0 commit comments