阅读背景:

如何在使用each_char时跟踪迭代次数?

来源:互联网 

I am learning Ruby and thought of making a Binary->Decimal converter. It gets a binary string and converts to decimal equivalent. Is there a way to keep track of the current iteration step in ruby so that the variable 'x' can be removed?I am learning Ruby and thought of making a Bina




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: