This is copy/pasted from https://github.com/puppetlabs/facter/blob/1.7.4/lib/facter/domain.rb#L31 , which is generally undesirable. If this behavior does need to be shared, it should be extracted to a common method so that both facts can access the same behavior. Doing this will help prevent implementation drift between the two facts.