ruby: fix DfFlagarray.inspect when no indexenum

develop
jj 2013-03-16 21:06:31 +01:00
parent 8a6ec0007e
commit 4fe37b4bd5
1 changed files with 2 additions and 2 deletions

@ -642,7 +642,7 @@ module DFHack
@_tg = tg
end
# XXX DF uses stl::deque<some_struct>, so to have a C binding we'd need to single-case every
# possible struct size, like for StlVector. Just ignore it for now, deque are rare enough.
# possible struct size, like for StlVector. Just ignore it for now, deques are rare enough.
def inspect ; "#<StlDeque>" ; end
end
@ -676,7 +676,7 @@ module DFHack
def inspect
out = "#<DfFlagarray"
each_with_index { |e, idx|
out << " #{_indexenum.sym(idx)}" if e
out << " #{_indexenum ? _indexenum.sym(idx) : idx}" if e
}
out << '>'
end