> if char=~/\w|\s/i then
> @buffer+=char
> @position+=1
>
> else if id==14 then
> #backSpace
> @buffer=@buffer[0..@buffer.length-2]
> @position-=1
>
> else
> puts "caractere non reconnu : #{id}"
>
> end
Proper indentation will get you a clue:
if char=~/\w|\s/i then
@buffer+=char
@position+=1
else if id==14 then
#backSpace
@buffer=@buffer[0..@buffer.length-2]
@position-=1
else
puts "caractere non reconnu : #{id}"
end
Your are missing one end statement at the end...
gegroet,
Erik V. -
http://www.erikveen.dds.nl/