repo.or.cz
/
ruby.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[rubygems/rubygems] Use a constant empty tar header to avoid extra allocations
[ruby.git]
/
benchmark
/
irb_color.yml
blob
ebdc8d7e8b6e9226d55b21142ca1e6a03e6adf5a
1
prelude: |
2
require 'irb/color'
3
code = <<~'CODE'
4
def self.foo # bar
5
:"erb #{ERB.new("<%= self %>", trim_mode: ?-).result}"
6
end
7
CODE
8
benchmark:
9
irb_color_complete: |
10
IRB::Color.colorize_code(code, complete: true)
11
irb_color_incomplete: |
12
IRB::Color.colorize_code(code, complete: false)
13
loop_count: 2000000