From b88e0d6653836a57f2a51c03e204850319d8e218 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 8 Aug 2023 11:29:50 +0900 Subject: [PATCH] Merge `push_include` and `ruby_push_include` --- ruby.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/ruby.c b/ruby.c index 7d154b58e8..3234460894 100644 --- a/ruby.c +++ b/ruby.c @@ -439,7 +439,7 @@ usage(const char *name, int help, int highlight, int columns) #define rubylib_path_new rb_str_new static void -push_include(const char *path, VALUE (*filter)(VALUE)) +ruby_push_include(const char *path, VALUE (*filter)(VALUE)) { const char sep = PATH_SEP_CHAR; const char *p, *s; @@ -452,6 +452,7 @@ push_include(const char *path, VALUE (*filter)(VALUE)) # define is_path_sep(c) ((c) == sep) #endif + if (path == 0) return; p = path; while (*p) { long len; @@ -489,14 +490,6 @@ push_include(const char *path, VALUE (*filter)(VALUE)) } } -static void -ruby_push_include(const char *path, VALUE (*filter)(VALUE)) -{ - if (path == 0) - return; - push_include(path, filter); -} - static VALUE identical_path(VALUE path) {