From 4dc6bc429a4a36ee202efe0259db7471b404a553 Mon Sep 17 00:00:00 2001 From: Ian Kronquist Date: Tue, 21 Jul 2015 15:15:30 -0700 Subject: [PATCH] (PDOC-35) Dispatch handlers in correct order Subclasses have their superclass as part of their namespace and objects in the subclass's namespace must be registered first. Reverse the list of parsed objects so that the classes will be handled and registered in the correct order. --- lib/puppet_x/puppetlabs/strings/yard/parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet_x/puppetlabs/strings/yard/parser.rb b/lib/puppet_x/puppetlabs/strings/yard/parser.rb index 7237425..630846d 100644 --- a/lib/puppet_x/puppetlabs/strings/yard/parser.rb +++ b/lib/puppet_x/puppetlabs/strings/yard/parser.rb @@ -24,7 +24,7 @@ class PuppetX::PuppetLabs::Strings::YARD::PuppetParser < YARD::Parser::Base statements = @transformer.transform(@parse_result) # Ensure an array is returned and prune any nil values. - Array(statements).compact + Array(statements).compact.reverse end end