Don't recompute the strlen in pm_eval_make_iseq

We've already computed the length of the string, so we can reuse it.
This commit is contained in:
Peter Zhu 2024-12-17 13:34:57 -05:00 committed by Kevin Newton
parent e8d393c8ae
commit 85f3ed8cdb
Notes: git 2024-12-20 13:25:12 +00:00

View File

@ -1709,7 +1709,7 @@ pm_eval_make_iseq(VALUE src, VALUE fname, int line,
continue;
}
pm_string_constant_init(scope_local, name, strlen(name));
pm_string_constant_init(scope_local, name, length);
}
}