This goes one step farther than what nobu did in [feature #13498]
With this patch, special objects such as static symbols, integers, etc can be used as either key or values inside WeakMap. They simply don't have a finalizer defined on them.
This is useful if you need to deduplicate value objects
Related issues
Bug #13498: Weakref, Weakmap and define_finalizer don't work on frozen objects
Feature #16035: Allow non-finalizable objects such as Integer, static Symbol etc in ObjectSpace::WeakMap
Allow non-finalizable objects in ObjectSpace::WeakMap
[feature #16035]
This goes one step farther than what nobu did in [feature #13498]
With this patch, special objects such as static symbols, integers, etc can be used as either key or values inside WeakMap. They simply don't have a finalizer defined on them.
This is useful if you need to deduplicate value objects