lib/fat_table/table.rb in fat_table-0.9.1 vs lib/fat_table/table.rb in fat_table-0.9.2
- old
+ new
@@ -135,10 +135,10 @@
# that column's type and tolerance. Also, set any instance variables that
# might have been set by a subclass instance.
def empty_dup(result_cols = nil)
result_cols ||= heads
result_types = types.select { |k,_v| result_cols.include?(k) }
- result = Table.new(result_cols, **result_types)
+ result = self.class.new(result_cols, **result_types)
tolerant_cols.each do |h|
result.tolerant_cols << h
result.column(h).tolerant = true
end
(instance_variables - result.instance_variables).each do |v|