Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove historical dlog variables + misc cleanup

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4250 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
commit 21174f33afc9c37850c9df5b33473fb7b0a9dc86 1 parent 8d7a21b
Laurent Sansonetti authored
Showing with 4 additions and 24 deletions.
  1. +2 −2 MacRuby.m
  2. +2 −22 eval.c
4 MacRuby.m
View
@@ -16,14 +16,14 @@
@implementation MacRuby
-extern int ruby_initialized;
+extern bool ruby_initialized;
+ (MacRuby *)sharedRuntime
{
static MacRuby *runtime = nil;
if (runtime == nil) {
runtime = [[MacRuby alloc] init];
- if (ruby_initialized == 0) {
+ if (!ruby_initialized) {
int argc = 0;
char **argv = NULL;
ruby_sysinit(&argc, &argv);
24 eval.c
View
@@ -43,10 +43,7 @@ void Init_PreClass(void);
void Init_PreGCD(void);
void Init_PreEncoding(void);
-bool ruby_dlog_enabled = false;
-FILE *ruby_dlog_file = NULL;
-
-int ruby_initialized = 0;
+bool ruby_initialized = false;
void
ruby_init(void)
@@ -54,27 +51,10 @@ ruby_init(void)
if (ruby_initialized) {
return;
}
- ruby_initialized = 1;
+ ruby_initialized = true;
rb_origenviron = environ;
- char *s;
-
- s = getenv("MACRUBY_DEBUG");
- ruby_dlog_enabled = !(s == NULL || *s == '0');
- s = getenv("MACRUBY_DEBUG_FILE");
- if (s == NULL) {
- ruby_dlog_file = stderr;
- }
- else {
- ruby_dlog_file = fopen(s, "w");
- if (ruby_dlog_file == NULL) {
- fprintf(stderr, "cannot open macruby debug file `%s'",
- strerror(errno));
- ruby_dlog_file = stderr;
- }
- }
-
Init_PreClass(); // requires nothing
Init_PreGC(); // requires nothing
Init_PreVM(); // requires nothing
Please sign in to comment.
Something went wrong with that request. Please try again.