Index: objc.m
===================================================================
--- objc.m	(revision 766)
+++ objc.m	(working copy)
@@ -2919,7 +2919,7 @@
     NSString *path;
     NSBundle *bundle;
     NSError *error;
-
+    
     rb_scan_args(argc, argv, "11", &framework, &search_network);
 
     Check_Type(framework, T_STRING);
@@ -2977,6 +2977,14 @@
 		stringByAppendingPathComponent:@"Library"];
 	    FIND_LOAD_PATH_IN_LIBRARY(dir); 
 	}
+	
+    dirs = [[[[NSProcessInfo processInfo] environment] valueForKey:@"DYLD_FRAMEWORK_PATH"] componentsSeparatedByString: @":"];
+    for (i = 0, count = [dirs count]; i < count; i++) {
+        NSString *dir = [dirs objectAtIndex:i];
+        path = [dir stringByAppendingPathComponent:frameworkName];
+        if ([fileManager fileExistsAtPath:path])
+            goto success;
+    }
 
 #undef FIND_LOAD_PATH_IN_LIBRARY
 

