summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-25 07:21:54 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-25 07:21:54 +0000
commit993204f632e9fb5d88cf51ab65f3d81df1d4a130 (patch)
tree865b19fa24f67ba02ea675ec8805663d8a43548b /io.c
parent2f7ff9d1b8a75f2f791eb2cea4883d0d1da93df4 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/io.c b/io.c
index dabc680549..5e3a48e8ce 100644
--- a/io.c
+++ b/io.c
@@ -2108,10 +2108,8 @@ void
rb_p(obj) /* for debug print within C code */
VALUE obj;
{
- obj = rb_obj_as_string(rb_inspect(obj));
- fwrite(RSTRING(obj)->ptr, 1, RSTRING(obj)->len, stdout);
- obj = rb_default_rs;
- fwrite(RSTRING(obj)->ptr, 1, RSTRING(obj)->len, stdout);
+ rb_io_write(rb_defout, rb_obj_as_string(rb_inspect(obj)));
+ rb_io_write(rb_defout, rb_default_rs);
}
static VALUE