repo.or.cz
/
jruby.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix for JRUBY-2882. Handle error messages related to constructors better
[jruby.git]
/
bench
/
shootout
/
sumcol.ruby
blob
cdf6df945de563d35c493eaef54b46084d91add7
1
#!/usr/bin/ruby
2
# -*- mode: ruby -*-
3
# $Id: sumcol.ruby,v 1.2 2004-11-10 06:43:14 bfulgham Exp $
4
# http://www.bagley.org/~doug/shootout/
5
# from: Mathieu Bouchard, revised by Dave Anderson
6
7
count
=
0
8
l
=
""
9
STDIN
.
each
{ |
l
|
10
count
+=
l
.
to_i
11
}
12
puts count