Skip to content

Commit 8ceebfd

Browse files
committed
Merge remote-tracking branch 'upstream/master' into Ractor-Local-GC-version-1.2
2 parents 579d8e3 + e0545a0 commit 8ceebfd

File tree

30 files changed

+737
-401
lines changed

30 files changed

+737
-401
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
5151
env:
5252
enable_install_doc: no
53+
CODEQL_ACTION_CLEANUP_TRAP_CACHES: true
5354

5455
strategy:
5556
fail-fast: false

.github/workflows/windows.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,6 @@ jobs:
8888
scoop install vcpkg uutils-coreutils cmake@3.31.6
8989
shell: pwsh
9090

91-
- name: Export GitHub Actions cache environment variables
92-
uses: actions/github-script@v7
93-
with:
94-
script: |
95-
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
96-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
97-
9891
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9992
with:
10093
sparse-checkout-cone-mode: false
@@ -140,12 +133,17 @@ jobs:
140133
run: Get-Volume
141134
shell: pwsh
142135

136+
# vcpkg built-in cache is not working now
137+
- name: Restore vcpkg artifact
138+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
139+
with:
140+
path: C:\Users\runneradmin\AppData\Local\vcpkg\archives
141+
key: windows-${{ matrix.os }}-vcpkg-${{ hashFiles('src/vcpkg.json') }}
142+
143143
- name: Install libraries with vcpkg
144144
run: |
145-
vcpkg install
145+
vcpkg install --vcpkg-root=C:\Users\runneradmin\scoop\apps\vcpkg\current
146146
working-directory: src
147-
env:
148-
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
149147

150148
# TODO: We should use `../src` instead of `D:/a/ruby/ruby/src`
151149
- name: Configure

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The following bundled gems are promoted from default gems.
4343
* irb 1.15.2
4444
* reline 0.6.1
4545
* readline 0.0.4
46-
* fiddle 1.1.6
46+
* fiddle 1.1.8
4747

4848
We only list stdlib changes that are notable feature changes.
4949

@@ -58,7 +58,7 @@ The following default gems are updated.
5858
* RubyGems 3.7.0.dev
5959
* bundler 2.7.0.dev
6060
* cgi 0.4.2
61-
* json 2.10.2
61+
* json 2.11.2
6262
* optparse 0.7.0.dev.2
6363
* prism 1.4.0
6464
* psych 5.2.3

doc/syntax/exceptions.rdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,4 @@ You may also run some code when an exception is not raised:
103103
# It will not return implicitly.
104104
end
105105

106-
NB : Without explicit +return+ in the +ensure+ block, +begin+/+end+ block will return the last evaluated statement before entering in the `ensure` block.
106+
NB : Without explicit +return+ in the +ensure+ block, +begin+/+end+ block will return the last evaluated statement before entering in the +ensure+ block.

doc/zjit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,5 @@ make test-all TESTS="test/ruby/test_zjit.rb"
8989
You can also run a single test case by matching the method name:
9090

9191
```
92-
make test-all TESTS="test/ruby/test_zjit.rb -n test_putobject"
92+
make test-all TESTS="test/ruby/test_zjit.rb -n TestZJIT#test_putobject"
9393
```

ext/json/lib/json/common.rb

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,68 @@ def dump(obj, anIO = nil, limit = nil, kwargs = nil)
919919
end
920920
end
921921

922+
# :stopdoc:
923+
# All these were meant to be deprecated circa 2009, but were just set as undocumented
924+
# so usage still exist in the wild.
925+
def unparse(...)
926+
if RUBY_VERSION >= "3.0"
927+
warn "JSON.unparse is deprecated and will be removed in json 3.0.0, just use JSON.generate", uplevel: 1, category: :deprecated
928+
else
929+
warn "JSON.unparse is deprecated and will be removed in json 3.0.0, just use JSON.generate", uplevel: 1
930+
end
931+
generate(...)
932+
end
933+
module_function :unparse
934+
935+
def fast_unparse(...)
936+
if RUBY_VERSION >= "3.0"
937+
warn "JSON.fast_unparse is deprecated and will be removed in json 3.0.0, just use JSON.generate", uplevel: 1, category: :deprecated
938+
else
939+
warn "JSON.fast_unparse is deprecated and will be removed in json 3.0.0, just use JSON.generate", uplevel: 1
940+
end
941+
generate(...)
942+
end
943+
module_function :fast_unparse
944+
945+
def pretty_unparse(...)
946+
if RUBY_VERSION >= "3.0"
947+
warn "JSON.pretty_unparse is deprecated and will be removed in json 3.0.0, just use JSON.pretty_generate", uplevel: 1, category: :deprecated
948+
else
949+
warn "JSON.pretty_unparse is deprecated and will be removed in json 3.0.0, just use JSON.pretty_generate", uplevel: 1
950+
end
951+
pretty_generate(...)
952+
end
953+
module_function :fast_unparse
954+
955+
def restore(...)
956+
if RUBY_VERSION >= "3.0"
957+
warn "JSON.restore is deprecated and will be removed in json 3.0.0, just use JSON.load", uplevel: 1, category: :deprecated
958+
else
959+
warn "JSON.restore is deprecated and will be removed in json 3.0.0, just use JSON.load", uplevel: 1
960+
end
961+
load(...)
962+
end
963+
module_function :restore
964+
965+
class << self
966+
private
967+
968+
def const_missing(const_name)
969+
case const_name
970+
when :PRETTY_STATE_PROTOTYPE
971+
if RUBY_VERSION >= "3.0"
972+
warn "JSON::PRETTY_STATE_PROTOTYPE is deprecated and will be removed in json 3.0.0, just use JSON.pretty_generate", uplevel: 1, category: :deprecated
973+
else
974+
warn "JSON::PRETTY_STATE_PROTOTYPE is deprecated and will be removed in json 3.0.0, just use JSON.pretty_generate", uplevel: 1
975+
end
976+
state.new(PRETTY_GENERATE_OPTIONS)
977+
else
978+
super
979+
end
980+
end
981+
end
982+
# :startdoc:
983+
922984
# JSON::Coder holds a parser and generator configuration.
923985
#
924986
# module MyApp

ext/json/lib/json/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module JSON
4-
VERSION = '2.10.2'
4+
VERSION = '2.11.2'
55
end

gc/default/default.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7146,18 +7146,24 @@ rb_gc_impl_writebarrier_remember(void *objspace_ptr, VALUE obj)
71467146
}
71477147
}
71487148

7149-
#define RB_GC_OBJECT_METADATA_ENTRY_COUNT 7
7149+
struct rb_gc_object_metadata_names {
7150+
// Must be ID only
7151+
ID ID_wb_protected, ID_age, ID_old, ID_uncollectible, ID_marking,
7152+
ID_marked, ID_pinned, ID_object_id, ID_shareable;
7153+
};
7154+
7155+
#define RB_GC_OBJECT_METADATA_ENTRY_COUNT (sizeof(struct rb_gc_object_metadata_names) / sizeof(ID))
71507156
static struct rb_gc_object_metadata_entry object_metadata_entries[RB_GC_OBJECT_METADATA_ENTRY_COUNT + 1];
71517157

71527158
struct rb_gc_object_metadata_entry *
71537159
rb_gc_impl_object_metadata(void *objspace_ptr, VALUE obj)
71547160
{
71557161
rb_objspace_t *objspace = objspace_ptr;
71567162
size_t n = 0;
7157-
static ID ID_wb_protected, ID_age, ID_old, ID_uncollectible, ID_marking, ID_marked, ID_pinned, ID_object_id;
7163+
static struct rb_gc_object_metadata_names names;
71587164

7159-
if (!ID_marked) {
7160-
#define I(s) ID_##s = rb_intern(#s);
7165+
if (!names.ID_marked) {
7166+
#define I(s) names.ID_##s = rb_intern(#s)
71617167
I(wb_protected);
71627168
I(age);
71637169
I(old);
@@ -7166,12 +7172,13 @@ rb_gc_impl_object_metadata(void *objspace_ptr, VALUE obj)
71667172
I(marked);
71677173
I(pinned);
71687174
I(object_id);
7175+
I(shareable);
71697176
#undef I
71707177
}
71717178

71727179
#define SET_ENTRY(na, v) do { \
71737180
GC_ASSERT(n <= RB_GC_OBJECT_METADATA_ENTRY_COUNT); \
7174-
object_metadata_entries[n].name = ID_##na; \
7181+
object_metadata_entries[n].name = names.ID_##na; \
71757182
object_metadata_entries[n].val = v; \
71767183
n++; \
71777184
} while (0)
@@ -7184,6 +7191,7 @@ rb_gc_impl_object_metadata(void *objspace_ptr, VALUE obj)
71847191
if (RVALUE_MARKED(obj)) SET_ENTRY(marked, Qtrue);
71857192
if (RVALUE_PINNED(objspace, obj)) SET_ENTRY(pinned, Qtrue);
71867193
if (FL_TEST(obj, FL_SEEN_OBJ_ID)) SET_ENTRY(object_id, rb_obj_id(obj));
7194+
if (FL_TEST(obj, FL_SHAREABLE)) SET_ENTRY(shareable, Qtrue);
71877195

71887196
object_metadata_entries[n].name = 0;
71897197
object_metadata_entries[n].val = 0;

gems/bundled_gems

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ win32ole 1.9.2 https://github.com/ruby/win32ole
4444
irb 1.15.2 https://github.com/ruby/irb
4545
reline 0.6.1 https://github.com/ruby/reline
4646
readline 0.0.4 https://github.com/ruby/readline
47-
fiddle 1.1.6 https://github.com/ruby/fiddle
47+
fiddle 1.1.8 https://github.com/ruby/fiddle

lib/bundler/fetcher.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
require_relative "vendored_persistent"
44
require_relative "vendored_timeout"
5-
require "cgi"
65
require_relative "vendored_securerandom"
76
require "zlib"
87

0 commit comments

Comments
 (0)