main by ehird

class Talker\x0d
  attr_reader :name\x0d
\x0d
  def initialize(name)\x0d
    @name = name\x0d
  end\x0d
\x0d
  def say(msg)\x0d
    puts "#{name}: #{msg}"\x0d
  end\x0d
end\x0d
\x0d
class CurtTalker < Talker\x0d
  def say(msg)\x0d
    puts name+msg\x0d
  end\x0d
end\x0d
\x0d
ct = CurtTalker.new("ma")\x0d
ct.say("in")

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page