Advertisement
Guest User

Untitled

a guest
Mar 10th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.80 KB | None | 0 0
  1. /**********************************************************************
  2.  
  3.   main.c -
  4.  
  5.   $Author: shyouhei $
  6.   created at: Fri Aug 19 13:19:58 JST 1994
  7.  
  8.   Copyright (C) 1993-2007 Yukihiro Matsumoto
  9.  
  10. **********************************************************************/
  11.  
  12. #undef RUBY_EXPORT
  13. #include "ruby.h"
  14. #include "debug.h"
  15. #ifdef HAVE_LOCALE_H
  16. #include <locale.h>
  17. #endif
  18. #ifdef RUBY_DEBUG_ENV
  19. #include <stdlib.h>
  20. #endif
  21.  
  22. RUBY_GLOBAL_SETUP
  23.  
  24. int
  25. main(int argc, char **argv)
  26. {
  27.     printf("%s\n", "Hello ruby world");
  28. #ifdef RUBY_DEBUG_ENV
  29.     ruby_set_debug_option(getenv("RUBY_DEBUG"));
  30. #endif
  31. #ifdef HAVE_LOCALE_H
  32.     setlocale(LC_CTYPE, "");
  33. #endif
  34.  
  35.     ruby_sysinit(&argc, &argv);
  36.     {
  37.     RUBY_INIT_STACK;
  38.     ruby_init();
  39.     return ruby_run_node(ruby_options(argc, argv));
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement