Thanks @stschulte for the contribution. Can we simplify this to just:

<code>
match = Facter.value(:operatingsystemrelease).match(/^(\d+)/)
match ? match[1] : nil
</code>