From: jack jones Date: 2011-08-25T21:34:06+09:00 Subject: Re: New to Ruby some problems First of all thank you very much 7stud :) okay I got the method but I had a question how would Ruby know what's in the [ ] and what's out of them for example : class Dog @array = [] def []=(arg1, arg2, arg3) array[arg1 + arg2] = arg3 # any operation end end d = Dog.new d.abc('hello') d.[1,2]= 3 # or d.[1] = 2, 3 # we have 3 args where to put each?? # another thing what if I have more than one array # I'll have to define the method name as def array1[]= (arg1, arg2, arg3) # that would be right or wrong?? -- Posted via http://www.ruby-forum.com/.