1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@15564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2008-02-21 07:47:12 +00:00
parent b356796f00
commit ca22f3e168
3 changed files with 12 additions and 6 deletions

View file

@ -7,6 +7,13 @@ Thu Feb 21 14:49:40 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (argf_set_encoding): uses current_file after check if next
input is available.
Thu Feb 21 14:13:38 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* io.c (rb_f_putc): invoke stdout method so that redefining putc
may take effect. [ruby-talk:291844]
* io.c (rb_f_puts): ditto.
Thu Feb 21 11:10:49 2008 NARUSE, Yui <naruse@ruby-lang.org>
* string.c: replace rb_enc_copy by rb_enc_cr_str_copy or

5
io.c
View file

@ -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

View file

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2008-02-21"
#define RUBY_RELEASE_DATE "2008-02-20"
#define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20080221
#define RUBY_RELEASE_CODE 20080220
#define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2008
#define RUBY_RELEASE_MONTH 2
#define RUBY_RELEASE_DAY 21
#define RUBY_RELEASE_DAY 20
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];