From 7a9fa94bff0be6b300b28995c71e3d9eac55ec9a Mon Sep 17 00:00:00 2001 From: Norman Clarke Date: Fri, 27 Apr 2012 14:27:14 -0300 Subject: [PATCH] Remove "scope" method --- Rakefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Rakefile b/Rakefile index fd101312..3468b102 100644 --- a/Rakefile +++ b/Rakefile @@ -6,10 +6,6 @@ task :default => :test CLEAN << %w(pkg doc coverage .yardoc) -def scope(path) - File.join(File.dirname(__FILE__), path) -end - desc "Benchmark Haml against ERb. TIMES=n sets the number of runs, default is 1000." task :benchmark do sh "ruby test/benchmark.rb #{ENV['TIMES']}" @@ -91,7 +87,7 @@ task :profile do require 'ruby-prof' require 'haml' - file = File.read(scope("test/templates/#{file || 'standard'}.haml")) + file = File.read(File.expand_path("../test/templates/#{file || 'standard'}.haml", __FILE__)) obj = Object.new Haml::Engine.new(file, :ugly => true).def_method(obj, :render) result = RubyProf.profile { times.times { obj.render } }