Sha256: b10d6a501ec9d8de6734d665832a6ef6da4d0f3ebd785a35da1e30391d67109d

Contents?: true

Size: 1.52 KB

Versions: 46

Compression:

Stored size: 1.52 KB

Contents

/* -*-c-*-
 THIS FILE WAS AUTOGENERATED BY tool/compile_prelude.rb. DO NOT EDIT.

 sources: prelude
*/
#include "ruby/ruby.h"
#include "vm_core.h"


static const char prelude_name0[] = "<internal:prelude>";
static const char prelude_code0[] =
"class Mutex\n"
"  # call-seq:\n"
"  #    mutex.synchronize { ... }\n"
"  #\n"
"  # Obtains a lock, runs the block, and releases the lock when the\n"
"  # block completes.  See the example under Mutex.\n"
"  def synchronize\n"
"    self.lock\n"
"    begin\n"
"      yield\n"
"    ensure\n"
"      self.unlock rescue nil\n"
"    end\n"
"  end\n"
"end\n"
"\n"
"class Thread\n"
"  MUTEX_FOR_THREAD_EXCLUSIVE = Mutex.new # :nodoc:\n"
"\n"
"  # call-seq:\n"
"  #    Thread.exclusive { block }   => obj\n"
"  #  \n"
"  # Wraps a block in Thread.critical, restoring the original value\n"
"  # upon exit from the critical section, and returns the value of the\n"
"  # block.\n"
"  def self.exclusive\n"
"    MUTEX_FOR_THREAD_EXCLUSIVE.synchronize{\n"
"      yield\n"
"    }\n"
"  end\n"
"end\n"
;

#define PRELUDE_COUNT 0


VALUE rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE filepath, VALUE line, VALUE opt);

static void
prelude_eval(VALUE code, VALUE name, VALUE line)
{
    rb_iseq_eval(rb_iseq_compile_with_option(code, name, Qnil, line, Qtrue));
}

void
Init_prelude(void)
{
//RHO
/*    prelude_eval(
      rb_usascii_str_new(prelude_code0, sizeof(prelude_code0) - 1),
      rb_usascii_str_new(prelude_name0, sizeof(prelude_name0) - 1),
      INT2FIX(1));

#if 0
    puts(prelude_code0);
#endif  */
//RHO
}

Version data entries

46 entries across 46 versions & 2 rubygems

Version Path
rhodes-5.5.18 platform/shared/ruby/miniprelude.c
rhodes-5.5.17 platform/shared/ruby/miniprelude.c
rhodes-5.5.15 platform/shared/ruby/miniprelude.c
rhodes-5.5.0.22 platform/shared/ruby/miniprelude.c
rhodes-5.5.2 platform/shared/ruby/miniprelude.c
rhodes-5.5.0.7 platform/shared/ruby/miniprelude.c
rhodes-5.5.0.3 platform/shared/ruby/miniprelude.c
rhodes-5.5.0 platform/shared/ruby/miniprelude.c
tauplatform-1.0.3 platform/shared/ruby/miniprelude.c
tauplatform-1.0.2 platform/shared/ruby/miniprelude.c
tauplatform-1.0.1 platform/shared/ruby/miniprelude.c
rhodes-3.5.1.12 platform/shared/ruby/miniprelude.c
rhodes-3.3.5 platform/shared/ruby/miniprelude.c
rhodes-3.4.2 platform/shared/ruby/miniprelude.c
rhodes-3.3.4 platform/shared/ruby/miniprelude.c
rhodes-3.3.3 platform/shared/ruby/miniprelude.c
rhodes-3.3.3.beta.4 platform/shared/ruby/miniprelude.c
rhodes-3.3.3.beta.3 platform/shared/ruby/miniprelude.c
rhodes-3.3.3.beta.2 platform/shared/ruby/miniprelude.c
rhodes-3.3.3.beta.1 platform/shared/ruby/miniprelude.c