Ruby  1.9.3p448(2013-06-27revision41675)
prelude.c
Go to the documentation of this file.
1 /* -*-c-*-
2  THIS FILE WAS AUTOGENERATED BY tool/compile_prelude.rb. DO NOT EDIT.
3 
4  sources: prelude, enc/prelude, gem_prelude
5 */
6 #include "ruby/ruby.h"
7 #include "internal.h"
8 #include "vm_core.h"
9 
10 
11 static const char prelude_name0[] = "<internal:prelude>";
12 static const char prelude_code0[] =
13 "class Mutex\n"
14 " # call-seq:\n"
15 " # mutex.synchronize { ... }\n"
16 " #\n"
17 " # Obtains a lock, runs the block, and releases the lock when the\n"
18 " # block completes. See the example under Mutex.\n"
19 " def synchronize\n"
20 " self.lock\n"
21 " begin\n"
22 " yield\n"
23 " ensure\n"
24 " self.unlock rescue nil\n"
25 " end\n"
26 " end\n"
27 "end\n"
28 "\n"
29 "class Thread\n"
30 " MUTEX_FOR_THREAD_EXCLUSIVE = Mutex.new # :nodoc:\n"
31 "\n"
32 " # call-seq:\n"
33 " # Thread.exclusive { block } => obj\n"
34 " #\n"
35 " # Wraps a block in Thread.critical, restoring the original value\n"
36 " # upon exit from the critical section, and returns the value of the\n"
37 " # block.\n"
38 " def self.exclusive\n"
39 " MUTEX_FOR_THREAD_EXCLUSIVE.synchronize{\n"
40 " yield\n"
41 " }\n"
42 " end\n"
43 "end\n"
44 ;
45 
46 static const char prelude_name1[] = "<internal:enc/prelude>";
47 static const char prelude_code1[] =
48 "%w'enc/encdb.so enc/trans/transdb.so'.each do |init|\n"
49 " begin\n"
50 " require(init)\n"
51 " rescue LoadError\n"
52 " end\n"
53 "end\n"
54 ;
55 
56 static const char prelude_name2[] = "<internal:gem_prelude>";
57 static const char prelude_code2[] =
58 "require 'rubygems.rb' if defined?(Gem)\n"
59 ;
60 
61 #define PRELUDE_COUNT 0
62 
63 
64 static void
66 {
68 }
69 
70 void
72 {
76  INT2FIX(1));
80  INT2FIX(1));
84  INT2FIX(1));
85 
86 #if 0
87  puts(prelude_code0);
88  puts(prelude_code1);
89  puts(prelude_code2);
90 #endif
91 }
92