set $~ to match array in String#sub, convert undefined values to nil
Merge pull request #254 from mojavelinux/more-match-data

set $~ to match array in String#sub, convert undefined values to nil