aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-15 07:47:03 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-15 07:47:03 +0000
commit758c51cafe539206b25364b6c84a70cccb8dd6ad (patch)
tree6a67b7d4531ef95bd0e475601e92168878717ddd /io.c
parentad1e42421cc06037f1c3f6622c6ce7775690941c (diff)
downloadruby-758c51cafe539206b25364b6c84a70cccb8dd6ad.tar.gz
* io.c (ARGF_FORWARD): wrongly compares with current_file with
rb_stdout. should be rb_stdin. [ruby-cvs:20177] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/io.c b/io.c
index dfefad4000..176159c01b 100644
--- a/io.c
+++ b/io.c
@@ -4308,7 +4308,7 @@ argf_forward(int argc, VALUE *argv)
}
#define ARGF_FORWARD(argc, argv) do {\
- if (current_file == rb_stdout && TYPE(current_file) != T_FILE)\
+ if (current_file == rb_stdin && TYPE(current_file) != T_FILE)\
return argf_forward(argc, argv);\
} while (0)
#define NEXT_ARGF_FORWARD(argc, argv) do {\
@@ -4447,7 +4447,7 @@ argf_getline(int argc, VALUE *argv)
retry:
if (!next_argv()) return Qnil;
- if (current_file == rb_stdout && TYPE(current_file) != T_FILE) {
+ if (current_file == rb_stdin && TYPE(current_file) != T_FILE) {
line = rb_funcall3(current_file, rb_intern("gets"), argc, argv);
}
else {
@@ -5359,7 +5359,7 @@ argf_read(int argc, VALUE *argv)
if (!next_argv()) {
return str;
}
- if (current_file == rb_stdout && TYPE(current_file) != T_FILE) {
+ if (current_file == rb_stdin && TYPE(current_file) != T_FILE) {
tmp = argf_forward(argc, argv);
}
else {
@@ -5405,7 +5405,7 @@ argf_readpartial(int argc, VALUE *argv)
rb_str_resize(str, 0);
rb_eof_error();
}
- if (current_file == rb_stdout && TYPE(current_file) != T_FILE) {
+ if (current_file == rb_stdin && TYPE(current_file) != T_FILE) {
tmp = rb_rescue2(argf_forward, (VALUE)argv,
argf_readpartial_rescue, (VALUE)Qnil,
rb_eEOFError, (VALUE)0);
@@ -5435,7 +5435,7 @@ argf_getc(void)
retry:
if (!next_argv()) return Qnil;
- if (current_file == rb_stdout && TYPE(current_file) != T_FILE) {
+ if (current_file == rb_stdin && TYPE(current_file) != T_FILE) {
ch = rb_funcall3(current_file, rb_intern("getc"), 0, 0);
}
else {