Skip to content

Instantly share code, notes, and snippets.

@jasonroelofs
Created September 1, 2009 14:26
Show Gist options
  • Save jasonroelofs/179116 to your computer and use it in GitHub Desktop.
Save jasonroelofs/179116 to your computer and use it in GitHub Desktop.
#!/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