From: Mathieu Bouchard Date: 2001-03-30T02:25:55+09:00 Subject: [ruby-talk:13333] Re: hash slice implementaion On Fri, 30 Mar 2001, Dan Schmidt wrote: > I made the suggestion recently that Array#[] and Hash#[] exhibit > slicing behavior when the argument is an Array (or any Enumerable, > maybe? Array#[](aRange) already works like this). If you accept any Enumerable, you have to make an exception for Range, because Array#[] and Array#[]= bypass Range's builtin semantics completely in their support for negative indices. > It would mean that you couldn't use Arrays as keys to Hashes, but that > seems like a bad idea anyway. You think so? matju