Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b51c5d2

Browse files
committed
fix code declaration
1 parent 7e32647 commit b51c5d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

load.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,7 @@ rb_load_internal0(rb_thread_t *th, VALUE fname, int wrap)
608608
if (state == 0) {
609609
NODE *node;
610610
VALUE iseq;
611+
VALUE io;
611612
VALUE fcname = rb_str_plus(fname, rb_str_new2("i"));
612613

613614
if (RTEST(rb_funcall(rb_cFile, rb_intern("exist?"), 1, fcname))) {
@@ -621,7 +622,7 @@ rb_load_internal0(rb_thread_t *th, VALUE fname, int wrap)
621622
iseq = rb_iseq_new_top(node, rb_str_new2("<top (required)>"), fname, rb_realpath_internal(Qnil, fname, 1), Qfalse);
622623
th->mild_compile_error--;
623624

624-
VALUE io = rb_file_open_str(fcname, "w");
625+
io = rb_file_open_str(fcname, "w");
625626
rb_marshal_dump(rb_funcall(iseq, rb_intern("to_a"), 0), io);
626627
rb_io_close(io);
627628
dpv("wrote bytecode to", fcname);

0 commit comments

Comments
 (0)