change regexp matchin Ruby versions to support Ruby2.1
Merge pull request #306 from boutil/master

change regexp matchin Ruby versions to support Ruby2.1