From a8a989b6f651b878c690f5fd0a728e19a54dd2b9 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 3 Jan 2026 12:28:00 +0900 Subject: [PATCH 1/2] Test net-imap with ruby/net-imap#593 Delete test/net/imap/test_data_lite.rb, because the target of this test file has been deleted by [ruby/net-imap#543]. [ruby/net-imap#543]: https://github.com/ruby/net-imap/pull/593 --- gems/bundled_gems | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gems/bundled_gems b/gems/bundled_gems index fcf63ab603ac6b..e709d57b793039 100644 --- a/gems/bundled_gems +++ b/gems/bundled_gems @@ -13,7 +13,7 @@ test-unit 3.7.7 https://github.com/test-unit/test-unit rexml 3.4.4 https://github.com/ruby/rexml rss 0.3.2 https://github.com/ruby/rss net-ftp 0.3.9 https://github.com/ruby/net-ftp -net-imap 0.6.2 https://github.com/ruby/net-imap +net-imap 0.6.2 https://github.com/ruby/net-imap d9ae35ef913a45f83387b8444cdce4fb1cbf01af net-pop 0.1.2 https://github.com/ruby/net-pop net-smtp 0.5.1 https://github.com/ruby/net-smtp matrix 0.4.3 https://github.com/ruby/matrix From d7a6ff8224519005d2deeb3f4e98689a8a0835ad Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 3 Jan 2026 15:03:57 +0900 Subject: [PATCH 2/2] [Bug #21819] Data objects without members should also be frozen --- struct.c | 1 + test/ruby/test_data.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/struct.c b/struct.c index 667d35424fb8d1..31df3798cbcb4b 100644 --- a/struct.c +++ b/struct.c @@ -1809,6 +1809,7 @@ rb_data_initialize_m(int argc, const VALUE *argv, VALUE self) if (num_members > 0) { rb_exc_raise(rb_keyword_error_new("missing", members)); } + OBJ_FREEZE(self); return Qnil; } if (argc > 1 || !RB_TYPE_P(argv[0], T_HASH)) { diff --git a/test/ruby/test_data.rb b/test/ruby/test_data.rb index dd698fdcc4a30e..5ac4c6b84b66aa 100644 --- a/test/ruby/test_data.rb +++ b/test/ruby/test_data.rb @@ -262,6 +262,7 @@ def test_memberless assert_equal('#', test.inspect) assert_equal([], test.members) assert_equal({}, test.to_h) + assert_predicate(test, :frozen?) end def test_dup