From f2eece71990fd79a5d7e24999f8df5c1121253c6 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Sun, 7 Dec 2025 14:58:28 +0900 Subject: [PATCH 1/6] Remove the internal-only attribute from ruby_reset_timezone() The #ifdef is currently not taken because include/ruby/backward.h is not included at this point. The attribute is unnecessary in an internal header, so remove it. --- internal/time.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/internal/time.h b/internal/time.h index e21b3574f6db7a..ad8133ed799c19 100644 --- a/internal/time.h +++ b/internal/time.h @@ -28,9 +28,6 @@ struct timeval rb_time_timeval(VALUE); RUBY_SYMBOL_EXPORT_BEGIN /* time.c (export) */ void ruby_reset_leap_second_info(void); -#ifdef RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY -RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY() -#endif void ruby_reset_timezone(const char *); RUBY_SYMBOL_EXPORT_END From be882278f22444e7d27db091bbd5f8bf63e882c2 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Sun, 7 Dec 2025 14:51:38 +0900 Subject: [PATCH 2/6] Move RBIMPL_ATTR_DEPRECATED_* macros to the appropriate header file Move these macros from include/ruby/backward.h to include/ruby/internal/attr/deprecated.h, alongside the other similar macros. include/ruby/internal/intern/vm.h cannot currently use them because include/ruby/backward.h is included too late. --- include/ruby/backward.h | 4 ---- include/ruby/internal/attr/deprecated.h | 7 +++++++ include/ruby/internal/intern/vm.h | 2 -- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/ruby/backward.h b/include/ruby/backward.h index f804c2c36e9425..3a0fda9ec56dda 100644 --- a/include/ruby/backward.h +++ b/include/ruby/backward.h @@ -11,10 +11,6 @@ #include "ruby/internal/interpreter.h" #include "ruby/backward/2/attributes.h" -#define RBIMPL_ATTR_DEPRECATED_SINCE(ver) RBIMPL_ATTR_DEPRECATED(("since " #ver)) -#define RBIMPL_ATTR_DEPRECATED_INTERNAL(ver) RBIMPL_ATTR_DEPRECATED(("since "#ver", also internal")) -#define RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY() RBIMPL_ATTR_DEPRECATED(("only for internal use")) - RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY() void rb_clear_constant_cache(void); /* from version.c */ diff --git a/include/ruby/internal/attr/deprecated.h b/include/ruby/internal/attr/deprecated.h index e1bbdbd15ad0de..9c9dea1df2794a 100644 --- a/include/ruby/internal/attr/deprecated.h +++ b/include/ruby/internal/attr/deprecated.h @@ -72,4 +72,11 @@ # define RBIMPL_ATTR_DEPRECATED_EXT(msg) RBIMPL_ATTR_DEPRECATED(msg) #endif +#define RBIMPL_ATTR_DEPRECATED_SINCE(ver) \ + RBIMPL_ATTR_DEPRECATED(("since " #ver)) +#define RBIMPL_ATTR_DEPRECATED_INTERNAL(ver) \ + RBIMPL_ATTR_DEPRECATED(("since "#ver", also internal")) +#define RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY() \ + RBIMPL_ATTR_DEPRECATED(("only for internal use")) + #endif /* RBIMPL_ATTR_DEPRECATED_H */ diff --git a/include/ruby/internal/intern/vm.h b/include/ruby/internal/intern/vm.h index 779f77fe91fcb5..0d25a9cdb041fc 100644 --- a/include/ruby/internal/intern/vm.h +++ b/include/ruby/internal/intern/vm.h @@ -95,7 +95,6 @@ VALUE rb_check_funcall(VALUE recv, ID mid, int argc, const VALUE *argv); */ VALUE rb_check_funcall_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat); -#ifdef RBIMPL_ATTR_DEPRECATED_INTERNAL /** * This API is practically a variant of rb_proc_call_kw() now. Historically * when there still was a concept called `$SAFE`, this was an API for that. @@ -112,7 +111,6 @@ VALUE rb_check_funcall_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int k */ RBIMPL_ATTR_DEPRECATED_INTERNAL(4.0) VALUE rb_eval_cmd_kw(VALUE cmd, VALUE arg, int kw_splat); -#endif /** * Identical to rb_funcallv(), except it takes Ruby's array instead of C's. From 4655b174d5fa71b69781c56701be63a02215b12f Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 8 Dec 2025 12:05:54 +0900 Subject: [PATCH 3/6] [ruby/timeout] v0.5.0 https://github.com/ruby/timeout/commit/837d5aac73 --- lib/timeout.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/timeout.rb b/lib/timeout.rb index 36cd0f915bc7ff..1640542d6f806a 100644 --- a/lib/timeout.rb +++ b/lib/timeout.rb @@ -20,7 +20,7 @@ module Timeout # The version - VERSION = "0.4.4" + VERSION = "0.5.0" # Internal error raised to when a timeout is triggered. class ExitException < Exception From fbc5bb91207f759c69c3a460bd8bb39915b152d8 Mon Sep 17 00:00:00 2001 From: git Date: Mon, 8 Dec 2025 03:07:35 +0000 Subject: [PATCH 4/6] Update default gems list at 4655b174d5fa71b69781c56701be63 [ci skip] --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 24a36475360569..95c02be9513306 100644 --- a/NEWS.md +++ b/NEWS.md @@ -254,7 +254,7 @@ The following default gems are updated. * resolv 0.6.3 * stringio 3.1.9.dev * strscan 3.1.6.dev -* timeout 0.4.4 +* timeout 0.5.0 * uri 1.1.1 * weakref 0.1.4 * zlib 3.2.2 From 6a1f5b68cbd90031d849265b663986c5b8dd39dd Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 8 Dec 2025 11:57:24 +0900 Subject: [PATCH 5/6] Make `ruby_reset_timezone` internal It is used only in hash.c, when `ENV['TZ']` is set. --- internal/time.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/time.h b/internal/time.h index ad8133ed799c19..224d485b2e1ce3 100644 --- a/internal/time.h +++ b/internal/time.h @@ -28,7 +28,8 @@ struct timeval rb_time_timeval(VALUE); RUBY_SYMBOL_EXPORT_BEGIN /* time.c (export) */ void ruby_reset_leap_second_info(void); -void ruby_reset_timezone(const char *); RUBY_SYMBOL_EXPORT_END +void ruby_reset_timezone(const char *); + #endif /* INTERNAL_TIME_H */ From a82aa08fe0112aefd35e28dc5ca3f9ea9238ae17 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 8 Dec 2025 12:04:11 +0900 Subject: [PATCH 6/6] Make `ruby_reset_leap_second_info` internal It is exported only for the extension library to test, but the method is no longer used since 29e31e72fb5a14194a78ec974c4ba56c33ad8d45. --- ext/-test-/time/leap_second.c | 15 --------------- internal/time.h | 1 - test/ruby/test_time_tz.rb | 1 - time.c | 2 ++ 4 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 ext/-test-/time/leap_second.c diff --git a/ext/-test-/time/leap_second.c b/ext/-test-/time/leap_second.c deleted file mode 100644 index ee7011fa97e983..00000000000000 --- a/ext/-test-/time/leap_second.c +++ /dev/null @@ -1,15 +0,0 @@ -#include "ruby.h" -#include "internal/time.h" - -static VALUE -bug_time_s_reset_leap_second_info(VALUE klass) -{ - ruby_reset_leap_second_info(); - return Qnil; -} - -void -Init_time_leap_second(VALUE klass) -{ - rb_define_singleton_method(klass, "reset_leap_second_info", bug_time_s_reset_leap_second_info, 0); -} diff --git a/internal/time.h b/internal/time.h index 224d485b2e1ce3..1f3505f5bc7685 100644 --- a/internal/time.h +++ b/internal/time.h @@ -27,7 +27,6 @@ struct timeval rb_time_timeval(VALUE); RUBY_SYMBOL_EXPORT_BEGIN /* time.c (export) */ -void ruby_reset_leap_second_info(void); RUBY_SYMBOL_EXPORT_END void ruby_reset_timezone(const char *); diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb index f66cd9bec2eedc..473c3cabcb4d50 100644 --- a/test/ruby/test_time_tz.rb +++ b/test/ruby/test_time_tz.rb @@ -1,6 +1,5 @@ # frozen_string_literal: false require 'test/unit' -require '-test-/time' class TestTimeTZ < Test::Unit::TestCase has_right_tz = true diff --git a/time.c b/time.c index 2a121d5fcc8f74..b2eed2daf3b85c 100644 --- a/time.c +++ b/time.c @@ -746,6 +746,8 @@ get_tzname(int dst) } #endif +static void ruby_reset_leap_second_info(void); + void ruby_reset_timezone(const char *val) {