[Rock-dev] [rock] #59: Typelib::ContainerType.<<(value) does not support argument strings longer than 1
rock
noreply at opendfki.de
Mon Oct 17 17:29:36 CEST 2011
#59: Typelib::ContainerType.<<(value) does not support argument strings longer
than 1
---------------------+-----------------------------------
Reporter: alco01 | Owner: rock-dev-mailing-list
Type: defect | Status: new
Priority: normal | Component: base
Resolution: | Keywords: Typelib Ruby
---------------------+-----------------------------------
Comment (by sylvain.joyeux):
In Ruby, << adds elements to an array. If you see (as typelib does)
strings as collections of characters, it is normal that << only appends
one character (but NOT normal that it does not raise an exception if given
a string of size != 1).
What you would like to have is #concat(), which unfortunately is broken
for string types.
In general, however, you should not have to manipulate /std/string objects
directly.What's your use case ?
--
Ticket URL: <https://rock.opendfki.de/ticket/59#comment:1>
rock <https://rock.opendfki.de>
rock: the robot construction kit
More information about the Rock-dev
mailing list