> > I would like to modify or create own Array#[]= method to return the array.
> >
> > [...]
> >
> > Many thanks,
> > -botp
> 
> Now this is strange: someone who doesn't like modifying objects wants to modify
> classes instead!
> 
> Anyway, I thought it would be really easy, but I can't seem to do it.
> 
> Cheers,
> Gavin

I'd probably do something in the vincinity of,
class SArray < Array
	def []= (a, b)
		super(a, b)
		self
	end
end

or perhaps:
class Array
	def set_element(a, b)
		self[a] = b
		self
	end
end

altering the basic []= behavior seems IMO like a pretty bad idea.