elixir-lang/elixir — pull request #1041 by pragdave (2013-05-09 17:40:32+00:00)
Title: Fix badmatch with Regex.captures(%r/(.)/g, "cat")

The above caused a badmatch because Regex.run didn't handle a return from re:run of just :match.

:match is returned if a pattern has /g but no captures are made. My fix was to have .run return [] in this case. The tests pass, but I'm a little nervous about compatibility in the field.

Dave