From: Ryan Davis Date: 2011-05-27T05:44:36+09:00 Subject: [ruby-core:36490] Kernel.p rdoc (and/or behavior) Given rb_f_p calling rb_p: > rb_f_p(int argc, VALUE *argv, VALUE self) > { > ... > for (i=0; i rb_p(argv[i]); > } and rb_p using rb_default_rs: > rb_p(VALUE obj) /* for debug print within C code */ > { > ... > io_write(rb_stdout, str, 1); > io_write(rb_stdout, rb_default_rs, 0); and rb_default_rs being newline, locked down, and not tied to the runtime: > rb_rs = rb_default_rs = rb_usascii_str_new2("\n"); > OBJ_FREEZE(rb_default_rs); /* avoid modifying RS_default */ I'd like to change the rdoc on p: Index: io.c =================================================================== --- io.c (revision 31444) +++ io.c (working copy) @@ -6231,9 +6231,8 @@ * p(obj1, obj2, ...) -> [obj, ...] * p() -> nil * - * For each object, directly writes - * _obj_.+inspect+ followed by the current output - * record separator to the program's standard output. + * For each object, directly writes _obj_.+inspect+ followed by a + * newline to the program's standard output. * * S = Struct.new(:name, :state) * s = S['dave', 'TX']