On Sat, 16 Dec 2000, Dave Thomas wrote: > "Joseph McDonald" <joe / vpop.net> writes: > > > I take it back (again). it does not appear that an array > > is automatically converted into a hash. sorry for talking > > to myself in front of you all :-0 > > But you can use the [] constructor > > Hash[1,2,3,4] # => {1=>2, 3=>4} > > Hash[*"a=b,c=d,e=f".tr('=', ',').split(',')] > # => {"e"=>"f", "a"=>"b", "c"=>"d"} > > (note the asterisk...) Oh yeah :-) Now I remember the train of thought that led from Hash[] to Array#to_h. I really must revisit that stuff. I never got as far as trying to do it in C, which might be worthwhile. (Amazing how those to_h and interleave discussions feels like The Old Days....) David -- David Alan Black home: dblack / candle.superlink.net work: blackdav / shu.edu Web: http://pirate.shu.edu/~blackdav