Guest User

Untitled

a guest
Apr 23rd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. extern "C" {
  2. void ruby_sysinit(int *, char ***);
  3. void ruby_init(void);
  4. void ruby_set_argv(int, char **);
  5. void rb_vm_init_compiler(void);
  6. void *rb_vm_top_self(void);
  7. void rb_vm_print_current_exception(void);
  8. void rb_exit(int);
  9. void *(void *, void *);
  10. void *(void *, void *);
  11. }
  12.  
  13. int main(int argc, char **argv)
  14. {
  15. ruby_sysinit(&argc, &argv);
  16. if (argc > 0) {
  17. argc--;
  18. argv++;
  19. }
  20. ruby_init();
  21. ruby_set_argv(argc, argv);
  22. rb_vm_init_compiler();
  23. try {
  24. void *self = rb_vm_top_self();
  25. (self, 0);
  26. (self, 0);
  27. }
  28. catch (...) {
  29. rb_vm_print_current_exception();
  30. rb_exit(1);
  31. }
  32. rb_exit(0);
  33. }
Add Comment
Please, Sign In to add comment