Please sign in to comment.
Cache Gem::Version instances for each version string
This prevents having numerous instances of the same value object. In particular, the use of String#scan in Version#segments is a hot spot. We could perform the caching there but it seems reasonable to cache the entire object.
- Loading branch information...