load shouldn't search for the file

This commit is contained in:
Alex Shinn 2013-02-20 20:43:25 +09:00
parent f60b72dbc0
commit 27af40b2fa

View file

@ -956,15 +956,12 @@
(let ((thunk (compile x (if (pair? o) (car o) (interaction-environment)))))
(if (procedure? thunk) (thunk) (raise thunk))))
(define (load base . o)
(define (load file . o)
(let* ((env (if (pair? o) (car o) (interaction-environment)))
(file (find-module-file base))
(len (and file (string-length file)))
(len (string-length file))
(ext *shared-object-extension*)
(ext-len (string-length ext)))
(cond
((not file)
(error "couldn't find file" base))
((and (> len ext-len 0) (equal? ext (substring file (- len ext-len))))
(%load file env))
(else