This is something i'm working on....
class Person
def initialize(@name, @street, @phone, @age)
puts "Created #{to_s} "
end
def to_s
"Person : #{@name}, the age of #{@age}, lives at #{@street} and has
phone no #{@phone}..."
end
end
s = Person.new( "Soeren", "Kronprinsensgade 26", "12345678", "21" )
puts s.to_s
My problem is that when i try to write my name correctly
s = Person.new( "Søòen", "Kronprinsensgade 26", "12345678", "21" )
i get an error
Can strings not contain national characters like"ø¢.... or do i have to do
something special to make the string contain the "ø¢ (eg. an escape
character)
/Søòen Munk Skrøäer
Odense, Denmark