On 4/9/06, Joern Dinkla <joern / dinkla.net> wrote:
[snip]
> I programmed it to learn Ruby and to improve my coding skills, because i
> have less than 2,5 weeks of experience with Ruby. I bought the
[snip]


You are doing good.

sometimes you use parentesis and other times you don't.
def test()     is the same as    def test
if(cond)     is the same as    if cond
.length()    is the same as    .length



   File.open(filename) do | file |
     file.each_line() do |line|

is the same as

   IO.readlines(filename).each do |line|



def initialize(mc = nil)
   if mc.nil?
     @mc = MarkovChain.new()
   else
     @mc = mc
   end
 end

is the same as

def initialize(mc = nil)
  @mc = mc || MarkovChain.new
end



--
Simon Strandgaard