Set#merge

Discussion in 'Ruby' started by Joel VanderWerf, Jan 31, 2006.

  1. Can anybody explain why Set#merge is destructive, but Hash#merge is not?

    --
    vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
     
    Joel VanderWerf, Jan 31, 2006
    #1
    1. Advertising

  2. Joel VanderWerf

    Stefan Walk Guest

    Joel VanderWerf wrote:
    > Can anybody explain why Set#merge is destructive, but Hash#merge is not?
    >


    Probably the same reason that Array#delete is destructive, but
    String#delete is not.

    Regards,
    Stefan
     
    Stefan Walk, Jan 31, 2006
    #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. Replies:
    2
    Views:
    4,535
  2. Replies:
    1
    Views:
    983
    Jonathan Bromley
    Mar 31, 2005
  3. Joe Cosby

    Perl "test merge"

    Joe Cosby, Apr 10, 2004, in forum: Perl
    Replies:
    2
    Views:
    527
    Joe Cosby
    Apr 11, 2004
  4. mark

    merge two asp.net website?

    mark, Aug 13, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    1,262
    John Saunders
    Aug 13, 2003
  5. A.M

    Merge Modules

    A.M, Apr 23, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    3,753
    Ken Cox [Microsoft MVP]
    Apr 23, 2004
Loading...

Share This Page