[macruby-changes] [1321] MacRuby/branches/experimental/load.c
source_changes at macosforge.org
source_changes at macosforge.org
Fri Apr 3 22:53:03 PDT 2009
Revision: 1321
http://trac.macosforge.org/projects/ruby/changeset/1321
Author: lsansonetti at apple.com
Date: 2009-04-03 22:53:02 -0700 (Fri, 03 Apr 2009)
Log Message:
-----------
a temporary fix for the 'require of the death' bug
Modified Paths:
--------------
MacRuby/branches/experimental/load.c
Modified: MacRuby/branches/experimental/load.c
===================================================================
--- MacRuby/branches/experimental/load.c 2009-04-04 02:26:07 UTC (rev 1320)
+++ MacRuby/branches/experimental/load.c 2009-04-04 05:53:02 UTC (rev 1321)
@@ -107,6 +107,17 @@
}
#endif
+static VALUE
+get_loading_table(void)
+{
+ static VALUE loading_table = 0;
+ if (loading_table == 0) {
+ loading_table = rb_ary_new();
+ rb_objc_retain((void *)loading_table);
+ }
+ return loading_table;
+}
+
static int
rb_feature_p(const char *feature, const char *ext, int rb, int expanded, const char **fn)
{
@@ -163,6 +174,12 @@
return 'r';
}
}
+ VALUE feature_str = rb_str_new2(feature);
+ if (rb_ary_includes(get_loading_table(), feature_str)) {
+ if (!ext) return 'u';
+ return !IS_RBEXT(ext) ? 's' : 'r';
+ }
+ rb_ary_push(get_loading_table(), feature_str);
#if 0
loading_tbl = get_loading_table();
if (loading_tbl) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090403/522dc536/attachment-0001.html>
More information about the macruby-changes
mailing list