diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-04-10 05:48:43 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-04-10 05:48:43 +0000 |
commit | 620b13d8777086b3b4da0e0a07e93b83ea38b66d (patch) | |
tree | 6dcd08ef584fc777cf34517136d5ce3948840e45 /io.c | |
parent | 0453f53db62f1321492288d1c904aade9bb0fa3e (diff) | |
download | ruby-620b13d8777086b3b4da0e0a07e93b83ea38b66d.tar.gz ruby-620b13d8777086b3b4da0e0a07e93b83ea38b66d.tar.xz ruby-620b13d8777086b3b4da0e0a07e93b83ea38b66d.zip |
2000-04-10
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -1799,7 +1799,7 @@ rb_io_reopen(argc, argv, file) rb_secure(4); if (rb_scan_args(argc, argv, "11", &fname, &nmode) == 1) { - if (TYPE(fname) == T_FILE) { /* fname must be IO */ + if (TYPE(fname) != T_STRING) { /* fname must be IO */ return io_reopen(file, fname); } } @@ -1895,7 +1895,7 @@ rb_io_printf(argc, argv, out) VALUE argv[]; VALUE out; { - io_write(out, rb_f_sprintf(argc, argv)); + rb_io_write(out, rb_f_sprintf(argc, argv)); return Qnil; } @@ -1915,7 +1915,7 @@ rb_f_printf(argc, argv) argv++; argc--; } - io_write(out, rb_f_sprintf(argc, argv)); + rb_io_write(out, rb_f_sprintf(argc, argv)); return Qnil; } @@ -2334,8 +2334,7 @@ next_argv() #if defined(MSDOS) || defined(__CYGWIN__) || defined(NT) ruby_add_suffix(str, ruby_inplace_mode); #else - rb_str_cat(str, ruby_inplace_mode, - strlen(ruby_inplace_mode)); + rb_str_cat2(str, ruby_inplace_mode); #endif #if defined(MSDOS) || defined(__BOW__) || defined(__CYGWIN__) || defined(NT) || defined(__human68k__) || defined(__EMX__) (void)fclose(fr); @@ -3063,7 +3062,7 @@ argf_read(argc, argv) } if (NIL_P(tmp) || RSTRING(tmp)->len == 0) return str; else if (NIL_P(str)) str = tmp; - else rb_str_cat(str, RSTRING(tmp)->ptr, RSTRING(tmp)->len); + else rb_str_append(str, tmp); if (argc == 0) { goto retry; } |