Issue #4572 has been reported by Brett Bender.
----------------------------------------
Bug #4572: Invalid next (SyntaxError) in application/kick.rb under Ruby 1.9.1
http://projects.puppetlabs.com/issues/4572
Author: Brett Bender
Status: Unreviewed
Priority: Normal
Assigned to:
Category:
Target version:
Affected version:
Keywords:
Branch:
% sudo puppetmasterd
/var/lib/gems/1.9.1/gems/puppet-2.6.0/lib/puppet/application/kick.rb:
/var/lib/gems/1.9.1/gems/puppet-2.6.0/lib/puppet/application/kick.rb:107:
Invalid next (SyntaxError)
I believe the "next" should perhaps be:
exit($CHILD_STATUS)
in the following from application/kick.rb:
<pre>
102 def run_for_host(host)
103 if options[:ping]
104 out = %x{ping -c 1 #{host}}
105 unless $CHILD_STATUS == 0
106 $stderr.print "Could not contact #{host}\n"
107 next
108 end
109 end
</pre>
Under Ruby 1.8.7 I get an error only if the "next" is reached, while in 1.9.1
it complains even when the next is not executed. That is, the following example
code runs without error on 1.8.7 but dies on 1.9.1
<pre>
def fun(word)
puts "the word is #{word}"
if false
next
end
end
%w( foo bar baz ).each do |word|
fun(word)
end
</pre>
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" 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-bugs?hl=en.