Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
// first iteration: simple guard by version string
// ....
// second iteration: Version object with semantic versioning, etc
RubyVersion v = version("1.9.2-p136");
v.major() // 1.9
v.minor() // 2
v.patchlevel() // 136
v.is1_9() // true (for compat)
v1 = version("1.9.2-p137");
v > v1 // false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment