> def enum(count, start=1) > (start...(start+count)).to_a > end > > a,b,c = enum 3 > > d,e,f,g,h = enum 5,120 > > a,b,c,d,e,f,g,h #=> 1, 2, 3, 120, 121, 122, 123, 124 I'm guessing that #to_a returns an ASCII representation of the object. If that's the case, while I realise Ruby isn't statically typed, doesn't this mean there'd be a conversion to ASCII and back again, which is slightly inefficient? Of course, this is probably not an issue in this case, since one would very likely only call the function a few times as part of initialisation. I'm just curious as to whether there's another way to do this that avoids the double translation. For example, would something like def enum(count, start=1) (start...(start+count)).self end work correctly? Of course, I'll go and try this immediately, so I'm really posting this just so other people can think about it, if it works and so that you can enlighten me as to why it's a stupid idea, if it doesn't :-).