1 2 3 4
def factorial( n ) if !(n.is_a? Integer) raise ArgumentError, "argument must be a positive integer" ...
Ruby A simple factorial program.
by lordzoner.myopenid.com,
November 12, 2008 02:16,
7 refactorings, tagged with short, ruby, factorial
1 2 3 4
res = [] path_without_calculation.gsub(/\{(.*?)\}/) {|match| res << match[1.. match.size-2] ...
Ruby Extract text between {} bra...
Can this be written shorten?
1 2 3 4
# Ruby Quiz 2 - Scalable LCD Monitor # Gerard (smeevil) de Brieder - Govannon - 2008-06-12 ...
Ruby Looking for comments on sty...
Hi all,
I am looking for...
1 2 3 4
#!/usr/bin/env ruby files = ARGV.collect { |fname| File.new(fname, 'w') } ...
Ruby Randomly split input lines.
by Scott Robinson,
November 15, 2007 08:56,
No refactoring, tagged with short, functional, oneliner, one-liner
My first Ruby script. I'm c...
I'm quite new to Ruby, and ...