Named matches fail on Ruby 1.8.7

Named matches don't work on Ruby 1.8.7, still the most used Ruby version by puppet installs.
Also as this breaks the usage when the file is located on puppet as well I would prefer another mechanism.  1.8.7 does not have a way to add custom schema to it's parse, later versions did add it.