Please review pull request #206: (#10727) Don't rely on Kernel#Pathname opened by (joshcooper)
Description:
A recent change to Puppet::Type::File made use of Kernel#Pathname
which is only available in ruby 1.8.5 and later. Since the change
introduced more incompatibility with pre-1.8.5 for no good reason, and
is trivial to fix, I'm fixing it to use Pathname.new instead.
- Opened: Fri Nov 11 18:51:26 UTC 2011
- Based on: puppetlabs:2.7.x (e8b9f64644eb3bbd6753e06c52258d07b63328b2)
- Requested merge: joshcooper:ticket/2.7.x/10727-undefined-method-pathname (7f0756d74111c18f81e5eeeb6b5d551c06f9baa9)
Diff follows:
diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb index b1e65b3..4c644cf 100644 --- a/lib/puppet/type/file.rb +++ b/lib/puppet/type/file.rb @@ -261,7 +261,7 @@ Puppet::Type.newtype(:file) do # Autorequire the nearest ancestor directory found in the catalog. autorequire(:file) do - path = Pathname(self[:path]) + path = Pathname.new(self[:path]) if !path.root? # Start at our parent, to avoid autorequiring ourself parents = path.parent.enum_for(:ascend)
--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.