Mailinglist Archive: yast-devel (224 mails)

< Previous Next >
Re: [yast-devel] until in ruby
On Wed, Jan 15, 2014 at 12:30:52PM +0100, Josef Reidinger wrote:
On Wed, 15 Jan 2014 12:09:38 +0100

I am not aware of any change in newer ruby. In fact in loops aren't
much used in object languages, because you more often iterate over
collection so something like
is used.

In this case I don't iterate over anything like that.

Even if Matz above mention that we would like to remove it, I
think that because he do not remove it for eight years, he cannot
easily remove it, so you can use it. If you place here code you would
like to do, there is always way how to do it without until.

Sure there always is.

The code is:


ret = UI.UserInput

<actions for some ret values>

end until <ret some values>

if ret == :ok

<do stuff>


See CommonWidgetsPopup in StorageProposal.rb. But I don't think
the code must improved now.

The funny thing is that ret is known after the begin end
construct. I didn't expect that.


To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups