Cloning arrays

Discussion in 'Ruby' started by Len Lawrence, Mar 22, 2008.

  1. Len Lawrence

    Len Lawrence Guest

    Thanks for the tutorials guys. Marshal proved the perfect solution.

    Len
     
    Len Lawrence, Mar 22, 2008
    #1
    1. Advertising

  2. Len Lawrence

    ara howard Guest

    On Mar 22, 2008, at 8:39 AM, Len Lawrence wrote:

    > Thanks for the tutorials guys. Marshal proved the perfect solution.


    fyi - i nearly always define this in my libs

    class Object
    def mcp
    Marshal.load(Marshal.dump(self))
    end
    end

    a = 1,2,3

    p a.mcp

    a @ http://codeforpeople.com/
    --
    it is not enough to be compassionate. you must act.
    h.h. the 14th dalai lama
     
    ara howard, Mar 22, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest

    Cloning Possible?

    Guest, Nov 10, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    399
    Steve C. Orr [MVP, MCSD]
    Nov 11, 2003
  2. =?Utf-8?B?QVZM?=

    cloning

    =?Utf-8?B?QVZM?=, Dec 14, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    494
    Eliyahu Goldin
    Dec 14, 2004
  3. Andreas Leitgeb

    arrays and cloning, where is it described?

    Andreas Leitgeb, Mar 5, 2008, in forum: Java
    Replies:
    26
    Views:
    616
    Andreas Leitgeb
    Mar 11, 2008
  4. Philipp
    Replies:
    21
    Views:
    1,130
    Philipp
    Jan 20, 2009
  5. Len Lawrence

    Cloning arrays

    Len Lawrence, Mar 22, 2008, in forum: Ruby
    Replies:
    4
    Views:
    116
    Len Lawrence
    Mar 22, 2008
Loading...

Share This Page