lib/neo4j/shared/initialize.rb in neo4j-5.0.15 vs lib/neo4j/shared/initialize.rb in neo4j-5.1.0.rc.1
- old
+ new
@@ -10,19 +10,19 @@
end
private
def convert_and_assign_attributes(properties)
- @attributes ||= self.class.attributes_nil_hash.dup
+ @attributes ||= Hash[self.class.attributes_nil_hash]
stringify_attributes!(@attributes, properties)
- self.default_properties = properties
+ self.default_properties = properties if respond_to?(:default_properties=)
self.class.declared_property_manager.convert_properties_to(self, :ruby, @attributes)
end
def stringify_attributes!(attr, properties)
properties.each_pair do |k, v|
key = self.class.declared_property_manager.string_key(k)
- attr[key] = v
+ attr[key.freeze] = v
end
end
end
end