Permalink
Browse files

Add ERB to the benchmark

  • Loading branch information...
1 parent 237873d commit cdcaa15914a600ad73d334d3e13b8d16066e2ab8 @judofyr committed Jul 13, 2009
Showing with 7 additions and 4 deletions.
  1. +3 −3 bench/nasty.erb
  2. +4 −1 bench/run.rb
View
@@ -13,9 +13,9 @@
<%= 1 + 9 + 8 + 2 %>
<%# numbers should work and this should be ignored %>
</div>
- <% 120.times do |number| -%>
+ <% 120.times do |number| %>
<a href="#id-<%= number %>"><%= number %></a>
- <% end -%>
+ <% end %>
<div id="body"><%= " Quotes should be loved! Just like people!" %></div>
Wow.
<p>
@@ -43,7 +43,7 @@
</ul>
<div class="of_divs_with_underscore" id="combo"><%= @should_eval = "with this text" %></div>
<div class="footer">
- <div><%== "See, and this contains a tag: <strong>escape me!</strong>" %></div>
+ <div><%= "See, and this contains a tag: <strong>escape me!</strong>" %></div>
<strong class="shout">
<%= "This is a really long ruby quote. It should be loved and wrapped because its more than 50 characters. This value may change in the future and this test may look stupid.\n" +
" So, I'm just making it *really* long. God, I hope this works" %>
View
@@ -7,6 +7,7 @@
require 'markaby'
require 'parkaby'
require 'erubis'
+require 'erb'
require 'tagz'
require 'haml'
require 'erector'
@@ -17,7 +18,9 @@
def define_erb(content)
Erubis::Eruby.new(content).def_method(@obj, :erubis)
- [['Erubis', '@obj.erubis']]
+ @obj.extend(ERB.new(content).def_module)
+ [['Erubis', '@obj.erubis'],
+ ['ERB', '@obj.erb']]
end
def define_mab(content)

0 comments on commit cdcaa15

Please sign in to comment.