Commit Graph
3 Commits
Author SHA1 Message Date
luigiandGitHub 7ea9588520 Use Enumerable#filter_map in more places (#15527) 2021-01-22 16:28:15 +01:00
luigiandGitHub eb51e43fb4 Optimize some regex matching (#15528)
* Use Regex#match?

* Replace =~ too

* Avoid to call match? from Nil

* Keep value of Regexp.last_match
2021-01-22 10:09:08 +01:00
luigiandGitHub 087ed84367 Optimize map { ... }.compact calls (#15513)
* Optimize map { ... }.compact

using Enumerable#filter_map, supported since Ruby 2.7

* Add poyfill for Enumerable#filter_map
2021-01-10 00:32:01 +01:00