1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

ruby.c (open_load_file): avoid shadowing variable for errno

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2018-01-24 20:50:29 +00:00
parent c50220619b
commit a41386a2dc

2
ruby.c
View file

@ -1965,7 +1965,7 @@ open_load_file(VALUE fname_v, int *xflag)
#endif #endif
if ((fd = rb_cloexec_open(fname, mode, 0)) < 0) { if ((fd = rb_cloexec_open(fname, mode, 0)) < 0) {
int e = errno; e = errno;
if (!rb_gc_for_fd(e)) { if (!rb_gc_for_fd(e)) {
rb_load_fail(fname_v, strerror(e)); rb_load_fail(fname_v, strerror(e));
} }