diff --git a/lib/harmony/page.rb b/lib/harmony/page.rb index d175dbe..5bd4ade 100644 --- a/lib/harmony/page.rb +++ b/lib/harmony/page.rb @@ -73,7 +73,9 @@ def initialize(document=nil) # def load(*paths) paths.flatten.each do |path| - window.load(path.to_s) + path.to_s.map {|f| + window.evaluate(File.read(f).gsub(/\A#!.*$/, ''), f, 1) + }.last end self end