We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
r_env_find()
1 parent 57fe1bd commit ddc8a68Copy full SHA for ddc8a68
src/internal/dots-ellipsis.c
@@ -6,14 +6,16 @@ r_obj* ffi_ellipsis_find_dots(r_obj* env) {
6
r_abort("`env` is a not an environment.");
7
}
8
9
- // `r_env_get()` doesn't work here because it triggers missing argument errors
10
- r_obj* dots = KEEP(r_env_find(env, r_syms.dots));
11
- if (dots == r_syms.unbound) {
+ // `r_env_get()` triggers missing argument errors
+ if (r_env_has_missing(env, r_syms.dots)) {
+ return r_syms.missing;
12
+ }
13
+
14
+ if (!r_env_has(env, r_syms.dots)) {
15
r_abort("No `...` found.");
16
17
- FREE(1);
- return dots;
18
+ return r_env_get(env, r_syms.dots);
19
20
21
r_obj* ffi_ellipsis_dots(r_obj* env) {
0 commit comments