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_p): returns arguments to intervene. [ruby-dev:29736]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-06-05 07:35:34 +00:00
parent 203286673d
commit d686a73d91
2 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Tue Jun 5 16:30:38 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* io.c (rb_f_p): returns arguments to intervene. [ruby-dev:29736]
Tue Jun 5 14:07:55 2007 Koichi Sasada <ko1@atdot.net>
* insns.def (invokeblock): check block is created by lambda

11
io.c
View file

@ -3980,17 +3980,24 @@ rb_p(VALUE obj) /* for debug print within C code */
*/
static VALUE
rb_f_p(int argc, VALUE *argv)
rb_f_p(int argc, VALUE *argv, VALUE self)
{
int i;
VALUE ret = Qnil;
for (i=0; i<argc; i++) {
rb_p(argv[i]);
}
if (argc == 1) {
ret = argv[0];
}
else {
ret = rb_ary_new4(argc, argv);
}
if (TYPE(rb_stdout) == T_FILE) {
rb_io_flush(rb_stdout);
}
return Qnil;
return ret;
}
/*