p(...)
public
For each object, directly writes obj.inspect followed by
the current output record separator to the program’s standard output.
S = Struct.new(:name, :state)
s = S['dave', 'TX']
p s
produces:
Show source
/*
* call-seq:
* p(obj, ...) => nil
*
* For each object, directly writes
* _obj_.+inspect+ followed by the current output
* record separator to the program's standard output.
*
* S = Struct.new(:name, :state)
* s = S['dave', 'TX']
* p s
*
* <em>produces:</em>
*
*
*/
static VALUE
rb_f_p(argc, argv)
int argc;
VALUE *argv;
{
int i;
for (i=0; i<argc; i++) {
rb_p(argv[i]);
}
if (TYPE(rb_stdout) == T_FILE) {
rb_io_flush(rb_stdout);
}
return Qnil;
}