Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 30 lines (24 sloc) 0.495 kb
b6832fc @mattly initial port from private repo
authored
1 def prefer lib
2 require lib
3 rescue LoadError
4 end
5
6 home = File.expand_path('~')
7
8 %w(
9 rubygems
10 ostruct
11 yaml
12 irb/completion
13 map_by_method
14 what_methods
15 pp
16 ).each {|l| prefer l }
17
18 IRB.conf[:AUTO_INDENT] = true
19 IRB.conf[:USE_READLINE] = true
20 IRB.conf[:HISTORY_FILE] = File.expand_path('~/.irb_history.rb') rescue nil
21 IRB.conf[:SAVE_HISTORY] = 50
22 IRB.conf[:EVAL_HISTORY] = 3
23
24 def time(times=1)
25 ret = nil
26 Benchmark.bm {|x| x.report { times.times { ret = yield } } }
27 ret
28 end
29
Something went wrong with that request. Please try again.