Fix for JRUBY-2882. Handle error messages related to constructors better
[jruby.git] / bench / shootout / nestedloop.ruby
blob0609950dc4a218973c81b1e530322a4ce548654e
1 #!/usr/bin/ruby
2 # -*- mode: ruby -*-
3 # $Id: nestedloop.ruby,v 1.1.1.1 2004-05-19 18:10:57 bfulgham Exp $
4 # http://www.bagley.org/~doug/shootout/
5 # from Avi Bryant
7 n = Integer(ARGV.shift || 1)
8 x = 0
9 n.times do
10 n.times do
11 n.times do
12 n.times do
13 n.times do
14 n.times do
15 x += 1
16 end
17 end
18 end
19 end
20 end
21 end
22 puts x