From 9aa9cf8ea02f9860d735103b0e3ccfde62c68f95 Mon Sep 17 00:00:00 2001 From: "Daisuke Fujimura (fd0)" Date: Sun, 30 Nov 2025 12:01:44 +0900 Subject: [PATCH 1/2] Fix switch fall-through in copy_ext_file_error --- box.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/box.c b/box.c index 42ee967c509c84..81f285b3212ccd 100644 --- a/box.c +++ b/box.c @@ -514,16 +514,22 @@ copy_ext_file_error(char *message, size_t size, int copy_retvalue, const char *s switch (copy_retvalue) { case 1: snprintf(message, size, "can't open the extension path: %s", src_path); + break; case 2: snprintf(message, size, "can't open the file to write: %s", dst_path); + break; case 3: snprintf(message, size, "failed to read the extension path: %s", src_path); + break; case 4: snprintf(message, size, "failed to write the extension path: %s", dst_path); + break; case 5: snprintf(message, size, "failed to stat the extension path to copy permissions: %s", src_path); + break; case 6: snprintf(message, size, "failed to set permissions to the copied extension path: %s", dst_path); + break; default: rb_bug("unknown return value of copy_ext_file: %d", copy_retvalue); } From a0cd81e005d185be37b3a0323e4ee61b7b4360a6 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 30 Nov 2025 21:07:33 +0900 Subject: [PATCH 2/2] Remove stale check Any objects with `call` method can be accepted as trap handlers, and the check for `Proc` type is useless since ruby/ruby@29f5911cf545. --- signal.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/signal.c b/signal.c index 1e2b0f613248c2..5971e12ee9b00f 100644 --- a/signal.c +++ b/signal.c @@ -1252,11 +1252,6 @@ trap_handler(VALUE *cmd, int sig) break; } } - else { - rb_proc_t *proc; - GetProcPtr(*cmd, proc); - (void)proc; - } } return func;