diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-21 07:47:12 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-21 07:47:12 +0000 |
commit | 2fcbc94f6ad13e357df3cbdf7082c2093f641316 (patch) | |
tree | f780af32a74390f4f4b56f409df7a84edc96bd54 /io.c | |
parent | d220e1f9e4c6574a80b72c072e6403c3408d9f47 (diff) | |
download | ruby-2fcbc94f6ad13e357df3cbdf7082c2093f641316.tar.gz ruby-2fcbc94f6ad13e357df3cbdf7082c2093f641316.tar.xz ruby-2fcbc94f6ad13e357df3cbdf7082c2093f641316.zip |
* io.c (rb_f_putc): invoke stdout method so that redefining putc
may take effect. [ruby-talk:291844]
* io.c (rb_f_puts): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -4470,7 +4470,7 @@ rb_io_putc(VALUE io, VALUE ch) static VALUE rb_f_putc(VALUE recv, VALUE ch) { - return rb_io_putc(rb_stdout, ch); + return rb_funcall2(rb_stdout, rb_intern("putc"), 1, &ch); } static VALUE @@ -4549,8 +4549,7 @@ rb_io_puts(int argc, VALUE *argv, VALUE out) static VALUE rb_f_puts(int argc, VALUE *argv) { - rb_io_puts(argc, argv, rb_stdout); - return Qnil; + return rb_funcall2(rb_stdout, rb_intern("puts"), argc, argv); } void |