开发者

Ruby 1.9: Break statement from recursive functions now a syntax error?

开发者 https://www.devze.com 2023-04-05 09:39 出处:网络
I\'m updating a bundle (GetBundles) to be compatible with Ruby 1.9 (1.9.2 specifically). This script uses

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消