add delete to list

This commit is contained in:
Torsten Ruger
2015-05-30 14:22:33 +03:00
parent e651b57d08
commit 96a20ff554
3 changed files with 50 additions and 2 deletions

View File

@ -90,6 +90,13 @@ module Parfait
old_length = old_length + 1
end
end
def internal_object_shrink(length)
old_length = internal_object_length()
while( length < old_length )
@memory.delete_at(old_length)
old_length = old_length - 1
end
end
def to_s
Sof::Writer.write(self)