Created
October 11, 2011 14:04
-
-
Save takaokouji/1278161 to your computer and use it in GitHub Desktop.
MacRuby requires <file>.rbo instead of <file>.rb when you write 'require "<file>.rb"' in your script and <file>.rbo was created recently
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/load.c b/load.c | |
index b070a12..bc00930 100644 | |
--- a/load.c | |
+++ b/load.c | |
@@ -323,6 +323,15 @@ check_path(const char *path, VALUE *out, int *type) | |
// it's a valid one, then try to validate the path. | |
int t = 0; | |
if (strcmp(p + 1, "rb") == 0) { | |
+ if (rbo_enabled && strlen(path) < (PATH_MAX - 1)) { | |
+ char buf[PATH_MAX]; | |
+ strcpy(buf, path); | |
+ strcat(buf, "o"); | |
+ if (path_ok(buf, out)) { | |
+ *type = TYPE_RBO; | |
+ return true; | |
+ } | |
+ } | |
t = TYPE_RB; | |
} | |
else if (rbo_enabled && strcmp(p + 1, "rbo") == 0) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment