use include so we can test with is_a

using the well documented included/extend trick
This commit is contained in:
Torsten Ruger
2015-10-25 19:16:12 +02:00
parent 3318b5026c
commit 60098257e9
6 changed files with 171 additions and 143 deletions

View File

@ -168,7 +168,7 @@ module Register
end
#puts "layout length=#{layout.get_length.to_s(16)} mem_len=#{layout.word_length.to_s(16)}"
l = layout.get_length
if( object.is_a? Parfait::List)
if( object.is_a? Parfait::Indexed)
object.each do |inst|
write_ref_for(inst)
end

View File

@ -27,7 +27,7 @@ module Register
inst = object.get_instance_variable name
keep(inst , depth + 1)
end
if object.is_a? Parfait::List
if object.is_a? Parfait::Indexed
object.each do |item|
#puts "Keep item "
keep(item , depth + 1)