lib/bindata/choice.rb in bindata-0.5.1 vs lib/bindata/choice.rb in bindata-0.6.0

- old
+ new

@@ -36,10 +36,10 @@ # instantiate all choices @choices = [] param(:choices).each do |choice_type, choice_params| choice_params ||= {} - klass = self.class.lookup(choice_type) + klass = klass_lookup(choice_type) if klass.nil? raise TypeError, "unknown type '#{choice_type.id2name}' for #{self}" end @choices << klass.new(choice_params, create_env) end