[Rock-dev] [rock] #430: Typelib compare should return false instead of raising ArgumentError
rock
noreply at opendfki.de
Thu Mar 13 13:16:14 CET 2014
#430: Typelib compare should return false instead of raising ArgumentError
-----------------------------+-----------------------------------
Reporter: christian.rauch | Owner: rock-dev-mailing-list
Type: defect | Status: new
Priority: normal | Milestone:
Component: base | Keywords: typelib, compare
-----------------------------+-----------------------------------
If different types are compared, the == operator should return false
instead of raising an exception:
<rock_path>/install/lib/ruby/1.9.1/typelib/type.rb:597:in `compare': in
propagation handler #<Proc:0x0000000349f608@/[...]>: cannot compare:
/base/samples/RigidBodyState_m and /base/samples/LaserScan are not
compatible types (ArgumentError)
The application for this would be using ruby classes like Array
encapsulating typelib objects.
E.g.:
Given a ruby Array 'tarray' of different typelib objects and searching for
a specific typelib object 'tobject' by
{{{
tarray.index(tobject)
}}}
will raise the error above. Instead the index of the object (or nil)
should be returned.
--
Ticket URL: <http://rock.opendfki.de/ticket/430>
rock <http://rock.opendfki.de>
rock: the robot construction kit
More information about the Rock-dev
mailing list