aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-05 05:07:54 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-05 05:07:54 +0000
commitc492b9b0857a76a94db586c87e3ab5a270b20746 (patch)
treef9703be8248360ab17a94821ad56d785bb27c0a7 /io.c
parent4198feb844a2fe307843d346bbde39894bd72faf (diff)
downloadruby-c492b9b0857a76a94db586c87e3ab5a270b20746.tar.gz
* eval.c (mark_frame_adj): need to adjust argv pointer if using
system's alloca. [ruby-core:01503] * io.c (rb_f_gets): should call next_argv() before type check current_file. [ruby-list:38336] * eval.c (proc_invoke): should retrieve retval when pcall is true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 3e623e29b7..ee030e894a 100644
--- a/io.c
+++ b/io.c
@@ -3115,8 +3115,8 @@ rb_f_gets(argc, argv)
{
VALUE line;
+ if (!next_argv()) return Qnil;
if (TYPE(current_file) != T_FILE) {
- if (!next_argv()) return Qnil;
line = rb_funcall3(current_file, rb_intern("gets"), argc, argv);
}
else {