Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Check to see if the file exists before trying to open it

  • Loading branch information...
commit 0ce96e3d32bb7b1c088d16f85bfa524114eba955 1 parent 82e642f
HD Moore authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/fastlib.rb
View
5 lib/fastlib.rb
@@ -98,7 +98,7 @@ def fastlib_already_tried?(name)
#
class FastLib
- VERSION = "0.0.3"
+ VERSION = "0.0.4"
@@cache = {}
@@ -141,6 +141,9 @@ def self.load(lib, name, noprocess=false)
def self.load_cache(lib)
return if @@cache[lib]
dict = {}
+
+ return if not ::File.exists?(lib)
+
::File.open(lib, 'rb') do |fd|
head = fd.read(4)
return if head != "FAST"
Please sign in to comment.
Something went wrong with that request. Please try again.