fixed, nay, hacked list problem

lists were in object space but not liked due to
equality returning true
This commit is contained in:
Torsten Ruger
2015-06-08 11:52:56 +02:00
parent 5b3045e42a
commit 0122585b3b
3 changed files with 11 additions and 2 deletions

View File

@ -140,6 +140,14 @@ module Parfait
end
return true
end
# above, correct, implementation causes problems in the machine object space
# because when a second empty (newly created) list is added, it is not actually
# added as it exists already. TODO, but hack with below identity function
def == other
self.object_id == other.object_id
end
#many basic List functions can not be defined in ruby, such as
# get/set/length/add/delete
# so they must be defined as CompiledMethods in Builtin::Kernel