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
4 changes: 4 additions & 0 deletions .github/workflows/bundled_gems.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: bundled_gems

env:
UPDATE_NEWS_ENABLED: false

on:
push:
branches: ['master']
Expand Down Expand Up @@ -67,6 +70,7 @@ jobs:
- name: Maintain updated gems list in NEWS
run: |
ruby tool/update-NEWS-gemlist.rb bundled
if: ${{ env.UPDATE_NEWS_ENABLED == 'true' }}

- name: Check diffs
id: diff
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/default_gems_list.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Update default gems list
on: [push, pull_request, merge_group]

env:
UPDATE_NEWS_ENABLED: false

concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
Expand Down Expand Up @@ -65,7 +68,7 @@ jobs:
- name: Maintain updated gems list in NEWS
run: |
ruby tool/update-NEWS-gemlist.rb default
if: ${{ steps.gems.outcome == 'success' }}
if: ${{ steps.gems.outcome == 'success' && env.UPDATE_NEWS_ENABLED == 'true' }}

- name: Check diffs
id: diff
Expand Down
2 changes: 2 additions & 0 deletions COPYING
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{日本語}[rdoc-ref:COPYING.ja]

Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
You can redistribute it and/or modify it under either the terms of the
2-clause BSDL (see the file BSDL), or the conditions below:
Expand Down
2 changes: 2 additions & 0 deletions COPYING.ja
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{English}[rdoc-ref:COPYING]

本プログラムはフリーソフトウェアです.2-clause BSDL
または以下に示す条件で本プログラムを再配布できます
2-clause BSDLについてはBSDLファイルを参照して下さい.
Expand Down
19 changes: 8 additions & 11 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,12 @@ Note: We're only listing outstanding class updates.

## Stdlib updates

We only list stdlib changes that are notable feature changes.

Other changes are listed in the following sections. We also listed release
history from the previous bundled version that is Ruby 3.4.0 if it has GitHub
releases.

The following bundled gems are promoted from default gems.

* ostruct 0.6.3
Expand All @@ -293,15 +299,6 @@ The following bundled gems are promoted from default gems.
* readline 0.0.4
* fiddle 1.1.8

The following bundled gems are added.


We only list stdlib changes that are notable feature changes.

Other changes are listed in the following sections. We also listed release
history from the previous bundled version that is Ruby 3.4.0 if it has GitHub
releases.

The following default gem is added.

* win32-registry 0.1.2
Expand Down Expand Up @@ -365,7 +362,7 @@ The following bundled gems are updated.

### RubyGems and Bundler

see the following links for details.
Ruby 4.0 bundled RubyGems and Bundler version 4. see the following links for details.

* [Upgrading to RubyGems/Bundler 4 - RubyGems Blog](https://blog.rubygems.org/2025/12/03/upgrade-to-rubygems-bundler-4.html)
* [4.0.0 Released - RubyGems Blog](https://blog.rubygems.org/2025/12/03/4.0.0-released.html)
Expand Down Expand Up @@ -513,7 +510,7 @@ A lot of work has gone into making Ractors more stable, performant, and usable.

* ZJIT
* Introduce an [experimental method-based JIT compiler](https://docs.ruby-lang.org/en/master/jit/zjit_md.html).
To enable `--zjit` support, build Ruby with Rust 1.85.0 or later.
To enable ZJIT on supported platforms, supply the `--zjit` option or call `RubyVM::ZJIT.enable` at runtime.
* As of Ruby 4.0.0, ZJIT is faster than the interpreter, but not yet as fast as YJIT.
We encourage experimentation with ZJIT, but advise against deploying it in production for now.
* Our goal is to make ZJIT faster than YJIT and production-ready in Ruby 4.1.
Expand Down
5 changes: 4 additions & 1 deletion box.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,8 @@ rb_box_eval(VALUE box_value, VALUE str)

static int box_experimental_warned = 0;

RUBY_EXTERN const char ruby_api_version_name[];

void
rb_initialize_main_box(void)
{
Expand All @@ -914,7 +916,8 @@ rb_initialize_main_box(void)
if (!box_experimental_warned) {
rb_category_warn(RB_WARN_CATEGORY_EXPERIMENTAL,
"Ruby::Box is experimental, and the behavior may change in the future!\n"
"See doc/language/box.md for known issues, etc.");
"See https://docs.ruby-lang.org/en/%s/Ruby/Box.html for known issues, etc.",
ruby_api_version_name);
box_experimental_warned = 1;
}

Expand Down
2 changes: 2 additions & 0 deletions doc/extension.ja.rdoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# extension.ja.rdoc - -*- RDoc -*- created at: Mon Aug 7 16:45:54 JST 1995

{English}[rdoc-ref:extension.rdoc]

= Rubyの拡張ライブラリの作り方

Rubyの拡張ライブラリの作り方を説明します.
Expand Down
2 changes: 2 additions & 0 deletions doc/extension.rdoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# extension.rdoc - -*- RDoc -*- created at: Mon Aug 7 16:45:54 JST 1995

{日本語}[rdoc-ref:extension.ja.rdoc]

= Creating extension libraries for Ruby

This document explains how to make extension libraries for Ruby.
Expand Down
4 changes: 2 additions & 2 deletions doc/language/globals.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require 'English'
| `$!` | `$ERROR_INFO` | \Exception object or `nil` | `nil` | Yes | Kernel#raise |
| `$@` | `$ERROR_POSITION` | \Array of backtrace positions or `nil` | `nil` | Yes | Kernel#raise |

### Pattern Matching
### Regular Expression

| Variable | \English | Contains | Initially | Read-Only | Reset By |
|:-------------:|:-------------------:|-----------------------------------|:---------:|:---------:|-----------------|
Expand Down Expand Up @@ -127,7 +127,7 @@ Output:

English - `$ERROR_POSITION`.

## Pattern Matching
## Regular Expression

These global variables store information about the most recent
successful match in the current scope.
Expand Down
2 changes: 1 addition & 1 deletion doc/language/signals.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ for its internal data structures, but it does not know when it is safe
for data structures in YOUR code. Ruby implements deferred signal
handling by registering short C functions with only
{async-signal-safe functions}[http://man7.org/linux/man-pages/man7/signal-safety.7.html] as
signal handlers. These short C functions only do enough tell the VM to
signal handlers. These short C functions only do enough to tell the VM to
run callbacks registered via Signal.trap later in the main Ruby Thread.

== Unsafe methods to call in Signal.trap blocks
Expand Down
4 changes: 2 additions & 2 deletions doc/string/partition.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Note that in the examples below, a returned string <tt>'hello'</tt>
is a copy of +self+, not +self+.

If +pattern+ is a Regexp, performs the equivalent of <tt>self.match(pattern)</tt>
(also setting {pattern-matching global variables}[rdoc-ref:language/globals.md@Pattern+Matching]):
(also setting {pattern-matching global variables}[rdoc-ref:language/globals.md@Regular+Expression]):

'hello'.partition(/h/) # => ["", "h", "ello"]
'hello'.partition(/l/) # => ["he", "l", "lo"]
Expand All @@ -30,7 +30,7 @@ If +pattern+ is a Regexp, performs the equivalent of <tt>self.match(pattern)</tt

If +pattern+ is not a Regexp, converts it to a string (if it is not already one),
then performs the equivalent of <tt>self.index(pattern)</tt>
(and does _not_ set {pattern-matching global variables}[rdoc-ref:language/globals.md@Pattern+Matching]):
(and does _not_ set {pattern-matching global variables}[rdoc-ref:language/globals.md@Regular+Expression]):

'hello'.partition('h') # => ["", "h", "ello"]
'hello'.partition('l') # => ["he", "l", "lo"]
Expand Down
4 changes: 2 additions & 2 deletions doc/string/rpartition.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The pattern used is:
Note that in the examples below, a returned string <tt>'hello'</tt> is a copy of +self+, not +self+.

If +pattern+ is a Regexp, searches for the last matching substring
(also setting {pattern-matching global variables}[rdoc-ref:language/globals.md@Pattern+Matching]):
(also setting {pattern-matching global variables}[rdoc-ref:language/globals.md@Regular+Expression]):

'hello'.rpartition(/l/) # => ["hel", "l", "o"]
'hello'.rpartition(/ll/) # => ["he", "ll", "o"]
Expand All @@ -36,7 +36,7 @@ If +pattern+ is a Regexp, searches for the last matching substring

If +pattern+ is not a Regexp, converts it to a string (if it is not already one),
then searches for the last matching substring
(and does _not_ set {pattern-matching global variables}[rdoc-ref:language/globals.md@Pattern+Matching]):
(and does _not_ set {pattern-matching global variables}[rdoc-ref:language/globals.md@Regular+Expression]):

'hello'.rpartition('l') # => ["hel", "l", "o"]
'hello'.rpartition('ll') # => ["he", "ll", "o"]
Expand Down
2 changes: 1 addition & 1 deletion ext/coverage/coverage.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ coverage_peek_result_i(st_data_t key, st_data_t val, st_data_t h)
* Coverage.peek_result => hash
*
* Returns a hash that contains filename as key and coverage array as value.
* This is the same as `Coverage.result(stop: false, clear: false)`.
* This is the same as <tt>Coverage.result(stop: false, clear: false)</tt>.
*
* {
* "file.rb" => [1, 2, nil],
Expand Down
6 changes: 3 additions & 3 deletions io_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ io_buffer_for_yield_instance_ensure(VALUE _arguments)
* buffer.get_string(0, 1)
* # => "t"
* string
* # => "best"
* # => "test"
*
* buffer.resize(100)
* # in `resize': Cannot resize external buffer! (IO::Buffer::AccessError)
Expand Down Expand Up @@ -3784,9 +3784,9 @@ io_buffer_not_inplace(VALUE self)
*
* File.write('test.txt', 'test data')
* # => 9
* buffer = IO::Buffer.map(File.open('test.txt'))
* buffer = IO::Buffer.map(File.open('test.txt'), nil, 0, IO::Buffer::READONLY)
* # =>
* # #<IO::Buffer 0x00007f3f0768c000+9 MAPPED IMMUTABLE>
* # #<IO::Buffer 0x00007f3f0768c000+9 EXTERNAL MAPPED FILE SHARED READONLY>
* # ...
* buffer.get_string(5, 2) # read 2 bytes, starting from offset 5
* # => "da"
Expand Down
30 changes: 17 additions & 13 deletions lib/cgi/escape.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
# frozen_string_literal: true

# :stopdoc
# Since Ruby 4.0, \CGI is a small holder for various escaping methods, included from CGI::Escape
#
# require 'cgi/escape'
#
# CGI.escape("Ruby programming language")
# #=> "Ruby+programming+language"
# CGI.escapeURIComponent("Ruby programming language")
# #=> "Ruby%20programming%20language"
#
# See CGI::Escape module for methods list and their description.
class CGI
module Escape; end
include Escape
extend Escape
module EscapeExt; end # :nodoc:
end
# :startdoc:

# Escape/unescape for CGI, HTML, URI.
# Web-related escape/unescape functionality.
module CGI::Escape
@@accept_charset = Encoding::UTF_8 unless defined?(@@accept_charset)

# URL-encode a string into application/x-www-form-urlencoded.
# Space characters (+" "+) are encoded with plus signs (+"+"+)
# Space characters (<tt>" "</tt>) are encoded with plus signs (<tt>"+"</tt>)
# url_encoded_string = CGI.escape("'Stop!' said Fred")
# # => "%27Stop%21%27+said+Fred"
def escape(string)
Expand All @@ -41,7 +49,7 @@ def unescape(string, encoding = @@accept_charset)
end

# URL-encode a string following RFC 3986
# Space characters (+" "+) are encoded with (+"%20"+)
# Space characters (<tt>" "</tt>) are encoded with (<tt>"%20"</tt>)
# url_encoded_string = CGI.escapeURIComponent("'Stop!' said Fred")
# # => "%27Stop%21%27%20said%20Fred"
def escapeURIComponent(string)
Expand Down Expand Up @@ -69,15 +77,15 @@ def unescapeURIComponent(string, encoding = @@accept_charset)
alias unescape_uri_component unescapeURIComponent

# The set of special characters and their escaped values
TABLE_FOR_ESCAPE_HTML__ = {
TABLE_FOR_ESCAPE_HTML__ = { # :nodoc:
"'" => '&#39;',
'&' => '&amp;',
'"' => '&quot;',
'<' => '&lt;',
'>' => '&gt;',
}

# Escape special characters in HTML, namely '&\"<>
# \Escape special characters in HTML, namely <tt>'&\"<></tt>
# CGI.escapeHTML('Usage: foo "bar" <baz>')
# # => "Usage: foo &quot;bar&quot; &lt;baz&gt;"
def escapeHTML(string)
Expand Down Expand Up @@ -160,11 +168,9 @@ def unescapeHTML(string)
string.force_encoding enc
end

# Synonym for CGI.escapeHTML(str)
alias escape_html escapeHTML
alias h escapeHTML

# Synonym for CGI.unescapeHTML(str)
alias unescape_html unescapeHTML

# TruffleRuby runs the pure-Ruby variant faster, do not use the C extension there
Expand All @@ -175,7 +181,7 @@ def unescapeHTML(string)
end
end

# Escape only the tags of certain HTML elements in +string+.
# \Escape only the tags of certain HTML elements in +string+.
#
# Takes an element or elements or array of elements. Each element
# is specified by the name of the element, without angle brackets.
Expand All @@ -199,7 +205,7 @@ def escapeElement(string, *elements)
end
end

# Undo escaping such as that done by CGI.escapeElement()
# Undo escaping such as that done by CGI.escapeElement
#
# print CGI.unescapeElement(
# CGI.escapeHTML('<BR><A HREF="url"></A>'), "A", "IMG")
Expand All @@ -219,10 +225,8 @@ def unescapeElement(string, *elements)
end
end

# Synonym for CGI.escapeElement(str)
alias escape_element escapeElement

# Synonym for CGI.unescapeElement(str)
alias unescape_element unescapeElement

end
7 changes: 5 additions & 2 deletions missing/dtoa.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,13 @@ Balloc(int k)
}

static void
Bfree(Bigint *v)
Bclear(Bigint **vp)
{
FREE(v);
Bigint *v = *vp;
*vp = NULL;
if (v) FREE(v);
}
#define Bfree(v) Bclear(&(v))

#define Bcopy(x,y) memcpy((char *)&(x)->sign, (char *)&(y)->sign, \
(y)->wds*sizeof(Long) + 2*sizeof(int))
Expand Down
Loading