fork download
  1. f = ->a {a.group_by(&:upcase).select {|_,v| 1 < v.size}.values}
  2. p f.(readlines.map &:chomp)
Success #stdin #stdout 0s 28216KB
stdin
aB.txt
Ab.txt
xx
cd
cD
CD
stdout
[["aB.txt", "Ab.txt"], ["cd", "cD", "CD"]]