HomePhorge

(#12114) Qualify usages of `::File` to avoid conflict with file face
b0c8d2c22345Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#12114) Qualify usages of ::File to avoid conflict with file face

Previously, if the file face had been loaded, then subsequent calls
to Puppet::Application.find would attempt to call
Puppet::Application::File.join, and fail since it should be calling
::File.join.

In addition, if spec/unit/application_spec.rb is tested first, then
several other order-dependent failures occurred, for the same reason
as above.

This commit uses the '::' scope resolution operator to refer to ruby's
File class and adds a spec test.

In general, if you add an application to lib/puppet/application/,
then you should fully qualify uses of ::File, otherwise, if the file
face is loaded first, your application may fail.

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUd4cf751bc5b2: Merge pull request #397 from mmrobins/ticket/2.7.x/2279-gem_reinstalls
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPUb0c8d2c22345: (#12114) Qualify usages of `::File` to avoid conflict with file face (authored by Josh Cooper <josh@puppetlabs.com>).Jan 24 2012, 11:33 PM