lib/rbbt/tsv/manipulate.rb in rbbt-util-5.34.14 vs lib/rbbt/tsv/manipulate.rb in rbbt-util-5.34.15
- old
+ new
@@ -358,10 +358,10 @@
def subset(keys)
new = TSV.setup({}, :key_field => key_field, :fields => fields, :type => type, :filename => filename, :identifiers => identifiers)
self.with_unnamed do
keys.each do |k|
- new[k] = self[k]
+ new[k] = self[k] if self.include?(k)
end
end
new
end