Created
November 21, 2009 23:11
-
-
Save boffbowsh/240330 to your computer and use it in GitHub Desktop.
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
| From d585c7a4753ce48d46e1ba44c5e5c831811ed864 Mon Sep 17 00:00:00 2001 | |
| From: Paul Bowsher <paul.bowsher@gmail.com> | |
| Date: Sat, 21 Nov 2009 23:06:39 +0000 | |
| Subject: [PATCH] Fix issue #81 | |
| Check that the file is readable before attempting to require it | |
| --- | |
| kernel/delta/requirer.rb | 3 +++ | |
| 1 files changed, 3 insertions(+), 0 deletions(-) | |
| diff --git a/kernel/delta/requirer.rb b/kernel/delta/requirer.rb | |
| index 616daf1..212a0e0 100644 | |
| --- a/kernel/delta/requirer.rb | |
| +++ b/kernel/delta/requirer.rb | |
| @@ -187,6 +187,9 @@ class Requirer | |
| end | |
| end | |
| + # Check that the file is readable | |
| + raise LoadError, "File '#{rb_path}' is not readable" unless rb_stat.readable? | |
| + | |
| compile_feature(rb, requiring) do | |
| cm = Rubinius::CompilerNG.compile_file_old(rb_path) | |
| raise LoadError, "Unable to compile: #{rb_path}" unless cm | |
| -- | |
| 1.6.4.4 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment