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
Copy file name to clipboardExpand all lines: _src/3.3.md
+52-6Lines changed: 52 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -621,8 +621,6 @@ Allows to trace when some exception was `rescue`'d in the code of interest.
621
621
***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).
622
622
623
623
624
-
## Standard library
625
-
626
624
## Standard library
627
625
628
626
SinceRuby3.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.
@@ -633,6 +631,33 @@ Since Ruby 3.1 release, most of the standard library is extracted to either _def
633
631
634
632
A few changes to mention, though:
635
633
634
+
* [BasicSocket#recv](https://docs.ruby-lang.org/en/master/BasicSocket.html#method-i-recv) and [BasicSocket#recv_nonblock](https://docs.ruby-lang.org/en/master/BasicSocket.html#method-i-recv_nonblock) returns `nil` instead of an empty string on closed connections. [BaicSocket#recvmsg](https://docs.ruby-lang.org/en/master/BasicSocket.html#method-i-recvmsg) and BasicSocket#recvmsg_nonblock returns `nil` instead of an empty packet on closed connections. Discussion: [Bug #19012]
635
+
*Name resolution such as [Socket.getaddrinfo](https://docs.ruby-lang.org/en/master/Socket.html#method-c-getaddrinfo), [Socket.getnameinfo](https://docs.ruby-lang.org/en/master/Socket.html#method-c-getnameinfo), [Addrinfo.getaddrinfo](https://docs.ruby-lang.org/en/master/Addrinfo.html#method-c-getaddrinfo) can now be interrupted. Discussion: [Feature #19965]
@@ -716,17 +741,38 @@ A few changes to mention, though:
716
741
717
742
### Standard library content changes
718
743
719
-
*`ext/readline` is retired
744
+
#### Additions
745
+
746
+
*[prism](https://github.com/ruby/prism) (nee YARP) is added. It is a new Ruby code parser, developed by Kevin Newton, which intends to become _the_ Ruby parser, shared by all implementations (not only CRuby/MRI, but also TruffleRuby, JRuby, and others) and tools that need to parser Ruby code (like Sorbet or Rubocop). It doesn't replace CRuby's Ruby parser at least for now, but can be used to parse Ruby quickly and produce robust, easy to use AST.
747
+
748
+
#### Removals
749
+
750
+
*`readline` extension is removed. It was a standard library written in C to wrap [GNU Readline](https://tiswww.case.edu/php/chet/readline/rltop.html), used to implement interactive consoles like IRB. Ruby includes pure-Ruby replacement called [reline](https://github.com/ruby/reline)[since 2.7](2.7.html#new-libraries), and now `require 'readline'` will just require it and make an alias `Readline = Reline`. Though, if the [readline-ext](https://github.com/ruby/readline-ext) gem is installed explicitly, `require 'readline'` would require it. Discussion: [Feature #19616].
751
+
```ruby
752
+
require'readline'
720
753
721
-
The following default gem is added.
754
+
Readline
755
+
# Ruby 3.2:
756
+
# => Readline -- a separate library/constant
757
+
# Ruby 3.3:
758
+
# => Reline -- Readline is just an alias
722
759
723
-
* prism 0.19.0
760
+
Readline.method(:readline)
761
+
# Ruby 3.2:
762
+
# => #<Method: Readline.readline(*)> -- a C-defined method with no location/signature extracted
_This means that if your dependencies are managed by Bundler and your code depend on `racc`, it should be added to a `Gemfile`._
770
+
727
771
* racc 1.7.3
728
772
729
-
### Gems that are warned to become bundled in the next version
773
+
#### Gems that are warned to become bundled in the next version
774
+
775
+
These gems wouldn't in a Bundler-managed environment unless explicitly added to `Gemfile` since the next version of Ruby. For now, requiring them in such environment would produce a warning. Discussion: [Feature #19351] (initial proposal to promote many gems, which then was deemed problematic), [Feature #19776] (the warning proposal)
0 commit comments