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