Created
September 1, 2009 14:26
-
-
Save jasonroelofs/179116 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'irb/completion' | |
require 'irb/ext/save-history' | |
require 'rubygems' | |
require 'wirble' | |
ARGV.concat [ "--readline", "--prompt-mode", "simple" ] | |
# History | |
IRB.conf[:SAVE_HISTORY] = 100 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" | |
# Eval history, get the last value with _ | |
IRB.conf[:EVAL_HISTORY] = 1000 | |
IRB.conf[:SAVE_HISTORY] = 100 | |
Wirble.init | |
Wirble.colorize | |
def bench(n=1e3,&b) | |
a=Time.now | |
n.to_i.times(&b) | |
Time.now-a | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment