Skip to content

Instantly share code, notes, and snippets.

View adelcambre's full-sized avatar

Andy Delcambre adelcambre

View GitHub Profile
@adelcambre
adelcambre / bench.rb
Created January 16, 2009 19:15 — forked from wycats/bench.rb
require "rubygems"
require "rbench"
RBench.run(500) do
report("memoed") do
Foo.memoed("hello")
end
report("unmemoed") do
Foo.unmemoed("hello")
end
options.scan(/(\w+)=(\w+)/).inject({}) { |h,(k,v)| h[k] = v; h }
Merb::Router.prepare do
# I don't like the name :condition for this
resources :users, :condition => /.*/ do
resources :comments
end
# match("/users/:id", :id => /.*/)
# match("/users/:user_id/comments", :user_id => /.*/)
end