repo.or.cz
/
ruby-svn.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
add a test for [ruby-dev:34579].
[ruby-svn.git]
/
benchmark
/
bm_app_erb.rb
blob
e58b7a34a1de0d578c48643a05aa7c90f6e4fa26
1
#
2
# Create many HTML strings with ERB.
3
#
4
5
require 'erb'
6
7
data = DATA.read
8
max = 5_000
9
title = "hello world!"
10
content = "hello world!\n" * 10
11
12
max.times{
13
ERB.new(data).result(binding)
14
}
15
16
__END__
17
18
<html>
19
<head> <%= title %> </head>
20
<body>
21
<h1> <%= title %> </h1>
22
<p>
23
<%= content %>
24
</p>
25
</body>
26
</html>