It's quite possible that it was simply an honest mistake, one that results from the complexity in the question and in both answers.
It looks like you both answered the question, but you answered using slightly different techniques, so it's possible he just got confused and thought he was doing you a favor.
Judging by his answer, using the jsbin, he doesn't seem like someone who would be cheap enough to do something underhanded. In my experience, the people who cheat generally don't put any effort into trying to be legitimate, and they are very transparent.
Is it possible that you were wrong? I can't say for sure, as I didn't run the code, and it's more complex than what my brain can handle at 7pm on a Friday night. :)
Aside from politely asking him to explain his edit, and one of you learning something in the process, there isn't really much that can be done. If someone can ask him to explain the edit, and it was indeed his mistake, then he might be more careful about his edits in the future, but I'd only suggest doing this if you can keep your cool. Remember, it could just be an honest mistake, so try not to throw accusations. Remember, it's just 15 rep points. :)