Discussion: How to copy arrays?
Afficher un message
Vieux 21/11/2007, 04h26   #2
Daniel N
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to copy arrays?

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

On Nov 21, 2007 2:20 PM, Martin Durai <martin@angleritech.com> wrote:

> I came accross another problem, how to copy arrays? Actually i need to
> copy array just like in java. i will include the source code of java.
> The same functionality i need in ruby. please any body me with this
>
> System.arraycopy(elName, 0, arr, 0, elStackSize);
>
> I need a way to do samething in ruby. please any body me with code
> for arraycopy.
>
> thanks in advance
>


The java doesn't mean anything to me That make me very happy.

@array.dup is the way to copy any object in ruby

  Réponse avec citation
 
Page generated in 2,43707 seconds with 9 queries