Sha256: 635908acb163341de79ee8222141c62f17a67aeddcf1fe6454804aeed5e769cb
Contents?: true
Size: 361 Bytes
Versions: 27
Compression:
Stored size: 361 Bytes
Contents
module CoreExtensions module MatchData # named_captures was introduced in Ruby 2.4.0 if RUBY_VERSION =~ /^2.3/ def named_captures names.zip(captures).to_h end end def capture index case index when Symbol, String named_captures[index.to_s] else captures[index] end end end end
Version data entries
27 entries across 27 versions & 1 rubygems