The old code under ruby 1.8.7 if it was hit would result in:

unexpected next (LocalJumpError)

In Ruby 1.9 it doesn't even give you the chance to run the code since
you get:

compile error (SyntaxError)

The code isn't tested so the intented behavior isn't clear, but in
context this looks like the right change.

Reviewed-by: Jacob Helwig <[email protected]>
Signed-off-by: Matt Robinson <[email protected]>
---
Local-branch: ticket/next/6820_ruby19_fixes
 lib/puppet/provider/service/daemontools.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/provider/service/daemontools.rb 
b/lib/puppet/provider/service/daemontools.rb
index bbb962a..f5a0733 100644
--- a/lib/puppet/provider/service/daemontools.rb
+++ b/lib/puppet/provider/service/daemontools.rb
@@ -67,7 +67,7 @@ Puppet::Type.type(:service).provide :daemontools, :parent => 
:base do
     path = self.defpath
     unless FileTest.directory?(path)
       Puppet.notice "Service path #{path} does not exist"
-      next
+      return
     end
 
     # reject entries that aren't either a directory
-- 
1.7.3.1

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to