From 27793ca83aff1c7185fef908182640095f15005e Mon Sep 17 00:00:00 2001 From: Shugo Maeda Date: Sat, 11 Jul 2026 17:23:04 +0900 Subject: [PATCH 1/2] Remove unused rb_vm_using_module 382645d440 added rb_vm_using_module together with its only caller (the namespace loader), and 4f47327287 removed that caller when the current namespace management was reworked, leaving the function unused. Co-Authored-By: Claude Fable 5 --- eval.c | 6 ------ internal/eval.h | 1 - 2 files changed, 7 deletions(-) diff --git a/eval.c b/eval.c index b6fedf11f36702..0f56d8eaec0c39 100644 --- a/eval.c +++ b/eval.c @@ -1492,12 +1492,6 @@ rb_using_module(const rb_cref_t *cref, VALUE module) rb_clear_all_refinement_method_cache(); } -void -rb_vm_using_module(VALUE module) -{ - rb_using_module(rb_vm_cref_replace_with_duplicated_cref(), module); -} - /* * call-seq: * target -> class_or_module diff --git a/internal/eval.h b/internal/eval.h index 17ade0a7f1e667..3f6b62d8fe5341 100644 --- a/internal/eval.h +++ b/internal/eval.h @@ -29,7 +29,6 @@ void rb_class_modify_check(VALUE); NORETURN(VALUE rb_f_raise(int argc, VALUE *argv)); VALUE rb_exception_setup(int argc, VALUE *argv); void rb_refinement_setup(struct rb_refinements_data *data, VALUE module, VALUE klass); -void rb_vm_using_module(VALUE module); VALUE rb_top_main_class(const char *method); VALUE rb_ec_ensure(rb_execution_context_t *ec, VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*e_proc)(VALUE), VALUE data2); From 9e195b7a516b2e69f75b88b71c17789ddc9373cc Mon Sep 17 00:00:00 2001 From: "Daisuke Fujimura (fd0)" Date: Tue, 9 Jun 2026 07:37:40 +0900 Subject: [PATCH 2/2] process.c: remove unreachable CYGWIN32 code path --- process.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/process.c b/process.c index ebc73ff07ae6bc..01aea3239a3696 100644 --- a/process.c +++ b/process.c @@ -1673,18 +1673,6 @@ proc_exec_sh(const char *str, VALUE envp_str) #ifdef _WIN32 rb_w32_uspawn(P_OVERLAY, (char *)str, 0); -#elif defined(__CYGWIN32__) - { - char fbuf[MAXPATHLEN]; - char *shell = dln_find_exe_r("sh", 0, fbuf, sizeof(fbuf)); - int status = -1; - if (shell) - execl(shell, "sh", "-c", str, (char *) NULL); - else - status = system(str); - if (status != -1) - exit(status); - } #else if (envp_str) execle("/bin/sh", "sh", "-c", str, (char *)NULL, RB_IMEMO_TMPBUF_PTR(envp_str)); /* async-signal-safe */