octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58572] class method isnumeric called instead


From: A.R. Burgers
Subject: [Octave-bug-tracker] [bug #58572] class method isnumeric called instead of built-in isnumeric
Date: Mon, 15 Jun 2020 03:34:11 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763

URL:
  <https://savannah.gnu.org/bugs/?58572>

                 Summary: class method isnumeric called instead of built-in
isnumeric
                 Project: GNU Octave
            Submitted by: arb
            Submitted on: Mon 15 Jun 2020 07:34:09 AM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 6.0.90
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

This example involves a class that defines a method isnumeric.
In the example, since recent changes, the class method is now called, where
previously the built-in method was called.

octave-5.2.0 (and matlab)


ver = 5.2.1
hg_id = 75a90bfc14b1+
use_num_result = 0


stable:


ver = 6.0.1
hg_id = 5a85e42a1be7
c_tst.isnumeric called
use_num_result = 1


class definition


classdef c_tst
  methods
    function rslt = use_num(obj)
      rslt = cellfun(@isnumeric, {'a_name'});
    end
    function rslt = isnumeric(obj)
      disp('c_tst.isnumeric called');
      rslt = true;
    end
  end
end


script:


ver = version
if exist ('OCTAVE_VERSION', 'builtin')
  hg_id = eval('__octave_config_info__.hg_id');
end
ci = c_tst;
use_num_result = ci.use_num





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58572>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]