Re: [Puppet-dev] Strange Module.nesting behaviour

12 views
Skip to first unread message

Patrick Carlisle

unread,
Jan 10, 2015, 7:02:59 PM1/10/15
to puppe...@googlegroups.com

On Sat, Jan 10, 2015 at 12:00 PM, bert hajee <bert....@gmail.com> wrote:
Now if we require puppet:

require 'puppet'
module Puppet
  puts Module.nesting
end

I get:

<module:Puppet>': undefined method `nesting' for Puppet::Module:Class (NoMethodError) 


Puppet has a class named Puppet::Module, and since you're referring to Module inside of Puppet it's interpreting it as a relative name and finding the wrong one. If you do 'puts ::Module.nesting' it should work.
Reply all
Reply to author
Forward
0 new messages