# [Ruby], <s>45</s> 40 bytes

<!-- language-all: lang-ruby -->

 ->n{n.gsub(/(.(.?))/,'\1\2\2').sum%10<1}

[Try it online!][TIO-jnkc5a1f]

[Ruby]: https://www.ruby-lang.org/
[TIO-jnkc5a1f]: https://tio.run/##KypNqvyfZvtf1y6vOk8vvbg0SUNfQ09Dz15TU19HPcYwxijGSF1Tr7g0V9XQwMaw9n@BQlq0koWlkbGZiZGJmaWpqaVSLBdE0NjcyMLS0NLYxMjQSCn2PwA "Ruby – Try It Online"