jruby/jrubyfx — pull request #33 by whitehat101 (2013-02-13 04:30:43+00:00)
Title: "JavaFX runtime not found" — a Quality Solution

Use a 1.9-style named regexp to correctly parse ENV_JAVA["java.runtime.version"]
I can write an equivalent 1.8-style regexp if necessary, but it would be less readable.

A few of the matches could be dropped, but leaving them in future-proofs the regexp.

See: http://rubular.com/r/UyWaY5qjIk

The current code will fail when java 8 is released (non-ea). `/-b(\d+)$/` would be nil, if no -bNN is present (nil.to_i is < 75). They also appear to reset their build count, when moving to a real release, eg -b04 would also match < 75. This proactively detects those conditions.

Parses:
1.8.0_10
1.8.0_10-u2-b23
1.8.0-ea-b75
1.7.0_10-ea-b07
1.8.0-ea-b63
1.6.0_33
1.6.0_31-b05
1.6.0_17-b04
1.7.0-u2-b21
1.7.0_13-b20