ruby-changes:61310
From: Nobuyoshi <ko1@a...>
Date: Thu, 21 May 2020 13:45:27 +0900 (JST)
Subject: [ruby-changes:61310] 62b47196e4 (master): Added UNREACHABLE_RETURN
https://git.ruby-lang.org/ruby.git/commit/?id=62b47196e4 From 62b47196e44757012b32e52a6b4af7560e59e334 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 21 May 2020 11:55:55 +0900 Subject: Added UNREACHABLE_RETURN To get rid of a void function at the end of non-void function. diff --git a/include/ruby/internal/scan_args.h b/include/ruby/internal/scan_args.h index dae9d65..d9329e7 100644 --- a/include/ruby/internal/scan_args.h +++ b/include/ruby/internal/scan_args.h @@ -345,6 +345,7 @@ rb_scan_args_set(int kw_flag, int argc, const VALUE *argv, https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/scan_args.h#L345 argc_error: rb_error_arity(argc, n_mand, f_var ? UNLIMITED_ARGUMENTS : n_mand + n_opt); + UNREACHABLE_RETURN(-1); #undef rb_scan_args_next_param } -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/