зеркало из https://github.com/github/ruby.git
refix r42525 set stdio_file only if stdio
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
4e742f4b40
Коммит
0e2a3cccf6
|
@ -503,7 +503,8 @@ readline_s_set_input(VALUE self, VALUE input)
|
|||
rb_sys_fail("fdopen");
|
||||
}
|
||||
rl_instream = f;
|
||||
ifp->stdio_file = f;
|
||||
if (f == stdin)
|
||||
ifp->stdio_file = f;
|
||||
readline_instream = input;
|
||||
}
|
||||
return input;
|
||||
|
@ -558,7 +559,8 @@ readline_s_set_output(VALUE self, VALUE output)
|
|||
rb_sys_fail("fdopen");
|
||||
}
|
||||
rl_outstream = f;
|
||||
ofp->stdio_file = f;
|
||||
if (f == stdout)
|
||||
ofp->stdio_file = f;
|
||||
readline_outstream = output;
|
||||
}
|
||||
return output;
|
||||
|
|
Загрузка…
Ссылка в новой задаче