lib/rasem/application.rb in rasem-0.6.0 vs lib/rasem/application.rb in rasem-0.6.1
- old
+ new
@@ -17,10 +17,10 @@
else
svg_file = source_file + ".svg"
end
img = Rasem::SVGImage.new("100%", "100%") do
begin
- load File.expand_path(source_file)
+ eval(File.read(File.expand_path(source_file)), binding, source_file, 1)
rescue Exception => e
# Keep the portion of stack trace that belongs to the .rasem file
backtrace = e.backtrace.grep(Regexp.new(File.expand_path(source_file)))
raise e.class, e.message, backtrace
end