[Rock-dev] [rock] #409: Orocos.rb: NumericType: `==': wrong argument type nil (expected Data) (TypeError)

rock noreply at opendfki.de
Tue Jan 14 14:15:36 CET 2014


#409: Orocos.rb: NumericType:  `==': wrong argument type nil (expected Data)
(TypeError)
----------------------------+-----------------------------------
 Reporter:  Alexander.Duda  |      Owner:  rock-dev-mailing-list
     Type:  defect          |     Status:  new
 Priority:  major           |  Milestone:
Component:  base            |   Keywords:
----------------------------+-----------------------------------
 It seems that the operator== on NumericTypes has some issues when used
 with other Typelib Types

 require 'orocos/log'

 Orocos.initialize
 Orocos.load_typekit 'base'

 val = Orocos.registry.get('/base/samples/frame/Frame')
 puts val === val.superclass # prints false
 puts val == val.superclass  # prints false

 val2 = Orocos.registry.get('/double')
 puts val2 === val2.superclass  # prints false
 puts val2 <=> val2.superclass  # prints -1
 puts val2 == val2              # prints true
 puts val2.superclass == val2.superclass  # prints true
 puts val2 == val2.superclass  # raises `==': wrong argument type nil
 (expected Data) (TypeError)
 puts val2 != val2.superclass  # raises `==': wrong argument type nil
 (expected Data) (TypeError)

-- 
Ticket URL: <https://rock.opendfki.de/ticket/409>
rock <https://rock.opendfki.de>
rock: the robot construction kit


More information about the Rock-dev mailing list