# File lib/dbi/columninfo.rb, line 37 def initialize(hash=nil) @hash = hash.dup rescue nil @hash ||= Hash.new # coerce all strings to symbols @hash.each_key do |x| if x.kind_of? String sym = x.to_sym if @hash.has_key? sym raise ::TypeError, "#{self.class.name} may construct from a hash keyed with strings or symbols, but not both" end @hash[sym] = @hash[x] @hash.delete(x) end end super(@hash) end