vendored/puppet/lib/puppet/functions/next.rb in bolt-0.20.3 vs vendored/puppet/lib/puppet/functions/next.rb in bolt-0.20.5

- old
+ new

@@ -7,17 +7,10 @@ dispatch :next_impl do optional_param 'Any', :value end def next_impl(value = nil) - stacktrace = Puppet::Pops::PuppetStack.stacktrace() - if stacktrace.size > 0 - file, line = stacktrace[0] - else - file = nil - line = nil - end - + file, line = Puppet::Pops::PuppetStack.top_of_stack exc = Puppet::Pops::Evaluator::Next.new(value, file, line) raise exc end end