1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Merge branch 'master' into yard

This commit is contained in:
Nathan Weizenbaum 2009-05-19 09:26:29 -07:00
commit 8396a7978f

View file

@ -21,8 +21,7 @@ module Sass
compiled_filename = sassc_filename(filename, options)
sha = Digest::SHA1.hexdigest(text)
if dump = try_to_read_sassc(filename, compiled_filename, sha)
root = Marshal.load(dump)
if root = try_to_read_sassc(filename, compiled_filename, sha)
root.options = options.merge(:filename => filename)
return root
end
@ -94,8 +93,10 @@ module Sass
File.open(compiled_filename) do |f|
return unless f.readline("\n").strip == Sass::VERSION
return unless f.readline("\n").strip == sha
return f.read
return Marshal.load(f.read)
end
rescue TypeError => e, ArgumentError => e
warn "Warning. Error encountered while reading cache #{compiled_filename}: #{e}"
end
def try_to_write_sassc(root, compiled_filename, sha, options)