[macruby-changes] [4430] MacRuby/trunk/dln.c

source_changes at macosforge.org source_changes at macosforge.org
Mon Aug 16 19:50:37 PDT 2010


Revision: 4430
          http://trac.macosforge.org/projects/ruby/changeset/4430
Author:   lsansonetti at apple.com
Date:     2010-08-16 19:50:32 -0700 (Mon, 16 Aug 2010)
Log Message:
-----------
don't attempt to #load directories

Modified Paths:
--------------
    MacRuby/trunk/dln.c

Modified: MacRuby/trunk/dln.c
===================================================================
--- MacRuby/trunk/dln.c	2010-08-17 02:14:40 UTC (rev 4429)
+++ MacRuby/trunk/dln.c	2010-08-17 02:50:32 UTC (rev 4430)
@@ -240,13 +240,10 @@
 	memcpy(bp, fname, i + 1);
 
 	if (stat(fbuf, &st) == 0) {
-	    if (exe_flag == 0) {
+	    if (!S_ISDIR(st.st_mode)
+		    && (exe_flag == 0 || eaccess(fbuf, X_OK) == 0)) {
 		return fbuf;
 	    }
-	    /* looking for executable */
-	    if (!S_ISDIR(st.st_mode) && eaccess(fbuf, X_OK) == 0) {
-		return fbuf;
-	    }
 	}
 
       next:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100816/7b39de17/attachment.html>


More information about the macruby-changes mailing list