more word tests

This commit is contained in:
Torsten Ruger
2015-05-15 20:31:43 +03:00
parent 0731a6061a
commit a46dd9f6bf
4 changed files with 97 additions and 22 deletions

View File

@ -59,4 +59,15 @@ module Parfait
end
word
end
Word.class_eval do
def to_s
string = ""
index = 0
while( index < self.length)
string[index] = get_char(index).chr
index = index + 1
end
string
end
end
end

View File

@ -61,7 +61,7 @@ module Parfait
return false if other.class != self.class
return false if other.length != self.length
len = self.length
while len
while(len >= 0)
return false if self.get_char(len) != other.get_char(len)
len = len - 1
end