Mailinglist Archive: yast-devel (144 mails)

< Previous Next >
Re: [yast-devel] Slight incompatibility between Ruby and YCP
Dne 1.8.2013 13:21, Josef Reidinger napsal(a):
On Thu, 1 Aug 2013 13:11:16 +0200
Thomas Fehr <fehr@xxxxxxx> wrote:
I think I found a slight incompatibility between Ruby and YCP

[...]

This works as before in assigning empty map to ret, but it now has
the side effect of a line being written to y2log stating:
[Ruby] yast/ops.rb:62 Index 0 is out of array size
while the equivalent YCP code did not create any y2log entries.

at first it is feature of ruby bindings that can be disabled, but I
found it quite useful, because for me it is usually indication of error
if you access array out of its index.

We should be bug-to-bug compatible with YCP and not cause any unexpected behavior. Judging what is or isn't a bad practice wasn't the scope of YCP Killer project. If it wasn't an error before, it shouldn't become an error now.

(Also note that out-of-bounds access isn't an error in Ruby itself when you use native [] operator -- at least for arrays and hashes.)

--
David Majda
SUSE Studio developer
http://susestudio.com/
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >