Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // In io.c the method 'puts' is defined as global function
- rb_define_global_function("puts", rb_f_puts, -1);
- // rb_f_puts is defined in io.c
- static VALUE
- rb_f_puts(int argc, VALUE *argv, VALUE recv)
- {
- if (recv == rb_stdout) {
- return rb_io_puts(argc, argv, recv);
- }
- return rb_funcall2(rb_stdout, rb_intern("puts"), argc, argv);
- }
Add Comment
Please, Sign In to add comment