Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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