Skip to content

Instantly share code, notes, and snippets.

require 'benchmark'
N = 200
range = 1..5000
Benchmark.bmbm do | x |
x.report "loop" do
N.times do
a = []
for i in range
a << lambda{ i }
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
it 'should do something' do
on_failure warn_that "@foo shouldn't be nil" do
@foo.should_not be_nil
end
end