more word tests
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user