mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
Pass Prism file paths as Ruby strings
Create system errors from the filepath VALUE so the full path is retained without relying on a NUL terminator or a separate GC guard.
This commit is contained in:
1 parent
c2883ddf97
commit
c67dc0dce7
1 file changed
+1
-2
Notes:
git
2026-07-15 04:29:36 +00:00
+1
-2
@@ -11540,8 +11540,7 @@ error_generic:
|
||||
error = rb_exc_new3(rb_eLoadError, message);
|
||||
rb_ivar_set(error, rb_intern_const("@path"), filepath);
|
||||
} else {
|
||||
error = rb_syserr_new(err, RSTRING_PTR(filepath));
|
||||
RB_GC_GUARD(filepath);
|
||||
error = rb_syserr_new_str(err, filepath);
|
||||
}
|
||||
|
||||
return error;
|
||||
|
||||
Reference in new issue
Block a user