emberjs/ember.js — pull request #817 by sgharms (2012-05-14 21:37:42+00:00)
Title: The sniff regex is incorrect

New regex does the right thing:

"1.7.1".match(/^1\.[67](.\d+)($|\.*pre$)/)
["1.7.1", ".1", ""]
"1.6.1".match(/^1\.[67](.\d+)($|\.*pre$)/)
["1.6.1", ".1", ""]

"1.7.1pre".match(/^1\.[67](.\d+)($|\.*pre$)/)
["1.7.1pre", ".1", "pre"]
"1.7.1.pre".match(/^1\.[67](.\d+)($|\.*pre$)/)
["1.7.1.pre", ".1", ".pre"]