Ruby 1.9: Break statement from recursive functions now a syntax error?
I'm updating a bundle (GetBundles) to be compatible with Ruby 1.9 (1.9.2 specifically).
This script uses
break if $close
in a (I'm assuming) recursive function. I'm assuming this is a recursive function since break doesn't make sense otherwise (this is not in a block except for the top-level function def). This is giving me a syntax error, however I couldn't find anything in the Ruby changelog that says it's now illegal. Is this now an error, or is it a bug in the s开发者_如何学JAVAcript?
Secondly, would
return if $close
be an equivalent replacement?
Thanks!
2 solutions: use the system Ruby 1.8.7 or use TM2.
精彩评论