fix regression from %r_i_r shown in rational.tst 31/20731/2
Samuel GOUGEON [Wed, 23 Jan 2019 17:15:00 +0000 (18:15 +0100)]
  + dead code cleaned

Change-Id: Iced6c8bcb7247f3ac24aee66ba84cdd652995f3c

scilab/modules/overloading/macros/%r_i_r.sci
scilab/modules/polynomials/tests/unit_tests/rational.tst [moved from scilab/modules/overloading/tests/unit_tests/rational.tst with 100% similarity]

index c764fb7..221d9e3 100644 (file)
@@ -20,11 +20,9 @@ function s1 = %r_i_r(varargin)
         sel = 1     // linearized indices
     end
     num = s2.num;
-    sz2 = size(num)
-    ind = list();
-    for i = sz2, ind($+1) = 1:i, end
     num(varargin(sel)) = s1.num
     den = s2.den
     den(varargin(sel)) = s1.den
+    den(num==0) = 1;
     s1 = rlist(num, den, s2.dt)
 endfunction