diff options
author | makoto kuwata <kwa@kuwata-lab.com> | 2008-04-29 12:00:24 +0000 |
---|---|---|
committer | makoto kuwata <kwa@kuwata-lab.com> | 2008-04-29 12:00:24 +0000 |
commit | 053af9263464a0556378fd052f8f7bb73168ce43 (patch) | |
tree | 8a2c4f8a3c5698059610581924fa9610c73103ca | |
parent | f9611595d264ab5e1d7e90b524fa71b9dcd077ba (diff) | |
download | erubis-053af9263464a0556378fd052f8f7bb73168ce43.tar.gz |
- [change] bench/bench.rb: Ruby 1.9 support
-rw-r--r-- | ChangeLog.txt | 6 | ||||
-rw-r--r-- | ReleaseNote.txt | 3 | ||||
-rw-r--r-- | benchmark/bench.rb | 24 |
3 files changed, 24 insertions, 9 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index 625df29..df6a22d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -2,6 +2,12 @@ .?lastupdate: $Date$ .?version: $Rev$ +: Rev.101 (2008-04-29) + .- [change] bench/bench.rb: Ruby 1.9 support + +: Rev.100 (2008-01-30) + .- [release] 2.5.0 + : Rev.99 (2008-01-29) .- [update] users-guide.txt: add tips about preprocessing in Rails 2.0 .- [debug] rails_helper.rb: _decode(): change /%3C%25%3D(.*?)%25%3E/ to /%3C%25(?:=|%3D)(.*?)%25%3E/ diff --git a/ReleaseNote.txt b/ReleaseNote.txt index c254389..86f0e05 100644 --- a/ReleaseNote.txt +++ b/ReleaseNote.txt @@ -5,6 +5,7 @@ http://www.kuwata-lab.com/erubis/ Erubis is another eRuby implementation which is very fast and extensible than ERB and eruby. + Enhancements from 2.4.1: * Ruby on Rails 2.0 support @@ -26,7 +27,7 @@ Enhancements from 2.4.1: -------------------- * (experimental) - Rails form helper methods for preprocessing are added. + Rails form helper methods for preprocessing are provided. These helper methos are available with preprocessing. ex. _form.rhtml diff --git a/benchmark/bench.rb b/benchmark/bench.rb index 7df11cf..7e21624 100644 --- a/benchmark/bench.rb +++ b/benchmark/bench.rb @@ -93,7 +93,8 @@ class BenchmarkApplication def execute_eruby(filename, context) return unless ERuby - eval context2code(context) + #eval context2code(context) + list = context['list'] @ntimes.times do ERuby.import(filename) end @@ -101,7 +102,8 @@ class BenchmarkApplication end def execute_erb(filename, context) - eval context2code(context) + #eval context2code(context) + list = context['list'] output = nil @ntimes.times do eruby = ERB.new(File.read(filename)) @@ -112,7 +114,8 @@ class BenchmarkApplication end def execute_erb_cached(filename, context) - eval context2code(context) + #eval context2code(context) + list = context['list'] output = nil cachefile = filename + '.cache' File.unlink(cachefile) if test(?f, cachefile) @@ -135,7 +138,8 @@ class BenchmarkApplication for klass in %w[Eruby FastEruby TinyEruby ArrayBufferEruby PrintOutEruby StdoutEruby] do s = <<-END def execute_erubis_#{klass.downcase}(filename, context) - eval context2code(context) + #eval context2code(context) + list = context['list'] output = nil @ntimes.times do eruby = Erubis::#{klass}.new(File.read(filename)) @@ -152,7 +156,8 @@ class BenchmarkApplication for klass in %w[Eruby FastEruby] do s = <<-END def execute_erubis_#{klass.downcase}_cached(filename, context) - eval context2code(context) + #eval context2code(context) + list = context['list'] cachefile = filename + '.cache' File.unlink(cachefile) if test(?f, cachefile) output = nil @@ -173,7 +178,8 @@ class BenchmarkApplication def convert_eruby(filename, context) return unless ERuby - eval context2code(context) + #eval context2code(context) + list = context['list'] output = nil @ntimes.times do output = ERuby::Compiler.new.compile_string(File.read(filename)) @@ -182,7 +188,8 @@ class BenchmarkApplication end def convert_erb(filename, context) - eval context2code(context) + #eval context2code(context) + list = context['list'] output = nil @ntimes.times do eruby = ERB.new(File.read(filename)) @@ -194,7 +201,8 @@ class BenchmarkApplication for klass in %w[Eruby FastEruby TinyEruby] s = <<-END def convert_erubis_#{klass.downcase}(filename, context) - eval context2code(context) + #eval context2code(context) + list = context['list'] output = nil @ntimes.times do eruby = Erubis::#{klass}.new(File.read(filename)) |