Ruby Warts

misfeatures and other problems
PERL| PHP| PYTHON| RUBY
What do each of the following programs do? (all answers)
(answer)
#!/usr/bin/ruby

def dostuff()
  puts "dostuff"
end

class Test
  def dostuff()
    puts "Test.dostuff"
  end
  def run
    self.dostuff
    dostuff
  end
end

t = Test.new
t.run
answer
PERL| PHP| PYTHON| RUBY
Last modified: March 30, 2006 @ 5:53 MST
Copyright (C) 1996-2024 Selene ToyKeeper