summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-26 14:59:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-26 14:59:19 +0000
commit38bde8a9e0487db2eeb59227ae90d4391fbf0663 (patch)
tree8ec0f16e80f1a446423108fdc19f7b4dbe66cd1d /io.c
parent5f0df5186540dd5a6f11063f6e420c86636b235d (diff)
* parse.y (open_args): warning message changed to "don't put space
before argument parentheses". * io.c (argf_read): ARGF.read() should read all argument files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/io.c b/io.c
index ce9b76c1b3..75008a97f7 100644
--- a/io.c
+++ b/io.c
@@ -3715,19 +3715,12 @@ argf_read(argc, argv)
if (NIL_P(tmp) && next_p != -1) {
io_close(current_file);
next_p = 1;
- return str;
+ if (argc == 0) goto retry;
}
if (NIL_P(tmp) || RSTRING(tmp)->len == 0) return str;
else if (NIL_P(str)) str = tmp;
else rb_str_append(str, tmp);
- if (argc == 0) {
- goto retry;
- }
- if (RSTRING(tmp)->len < len) {
- len -= RSTRING(tmp)->len;
- argv[0] = LONG2FIX(len);
- goto retry;
- }
+ if (argc == 0) goto retry;
return str;
}