Guest User

Untitled

a guest
Oct 22nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. // In io.c the method 'puts' is defined as global function
  2. rb_define_global_function("puts", rb_f_puts, -1);
  3.  
  4. // rb_f_puts is defined in io.c
  5. static VALUE
  6. rb_f_puts(int argc, VALUE *argv, VALUE recv)
  7. {
  8. if (recv == rb_stdout) {
  9. return rb_io_puts(argc, argv, recv);
  10. }
  11. return rb_funcall2(rb_stdout, rb_intern("puts"), argc, argv);
  12. }
Add Comment
Please, Sign In to add comment