[#3986] Re: Principle of least effort -- another Ruby virtue. — Andrew Hunt <andy@...>

> Principle of Least Effort.

14 messages 2000/07/14

[#4043] What are you using Ruby for? — Dave Thomas <Dave@...>

16 messages 2000/07/16

[#4139] Facilitating Ruby self-propagation with the rig-it autopolymorph application. — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/07/20

[ruby-talk:04214] Re: inserion in array.

From: Hugh Sasse Staff Elec Eng <hgs@...>
Date: 2000-07-25 16:01:31 UTC
List: ruby-talk #4214
On Tue, 25 Jul 2000, [iso-8859-1] Aleksi Niemelwrote:

> Well, I'm not sure what you want, but I assume you want to insert another
> array's content (all elements) after certain place in another array. That
> is, by example, to array [1,2,3] you want to insert array [4,5,6] right
> after second element, so that the end result would be [1,2,4,5,6,3].
> 
> And my ruby prints:
> 
>   ruby -e 'a=[1,2,3]; a[2,0]=[4,5,6]; p a'
>   
>   [1, 2, 4, 5, 6, 3]
> 
> 	- Aleksi

That is an interesting one.  I think the documentation for 1.4 should say
what happens when these patterns are on the left side of an assignment.
I may write some patches after playing with this some more.
> 
> 
	Thank you,
	Hugh
	


In This Thread