diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2025-12-31 14:52:16 +0100 |
|---|---|---|
| committer | Jean Boussier <jean.boussier@gmail.com> | 2026-01-02 16:59:00 +0100 |
| commit | 1596853428393136ee9964ad4c11b0120ed648d1 (patch) | |
| tree | 613bdfcb06c5f664cbb8491a38c75d0a10023599 | |
| parent | b9819ad06c883e6ea4f9e903c5bab06f175efb62 (diff) | |
Skip initializing optional arguments to `nil`
They are optional because they have a default value, so I don't
understand why we'd need to initialize them to nil.
| -rw-r--r-- | vm_args.c | 6 |
1 files changed, 0 insertions, 6 deletions
@@ -245,7 +245,6 @@ args_setup_opt_parameters(struct args_info *args, int opt_max, VALUE *locals) i = opt_max; } else { - int j; i = args->argc; args->argc = 0; @@ -257,11 +256,6 @@ args_setup_opt_parameters(struct args_info *args, int opt_max, VALUE *locals) locals[i] = argv[args->rest_index]; } } - - /* initialize by nil */ - for (j=i; j<opt_max; j++) { - locals[j] = Qnil; - } } return i; |
