Method: Object#display
- Defined in:
- io.c
#display(port = $>) ⇒ nil
Writes self on the given port:
1.display
"cat".display
[ 4, 5, 6 ].display
puts
Output:
1cat[4, 5, 6]
9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 |
# File 'io.c', line 9124 static VALUE rb_obj_display(int argc, VALUE *argv, VALUE self) { VALUE out; out = (!rb_check_arity(argc, 0, 1) ? rb_ractor_stdout() : argv[0]); rb_io_write(out, self); return Qnil; } |