From: Robert Klemme Date: 2010-04-01T16:57:01+09:00 Subject: Re: each_slice() 2010/4/1 Albert Schlef : > Albert Schlef wrote: >> But how is your answer helpful? >> >> I know each_slice() works in some versions of 1.8. It works on my 1.8 >> too. My question was: starting with *which* version? > > Let me be more elaborate: > > each_slice() was introduced in 1.9. It was then backported to 1.8. > That's how i understand what I read on the internet (I may be wrong). > > What I was trying to do was to find out, for example, if all "1.8.7" > versions have each_slice() and can be called without a block (so that I > could add ">= 1.8.7" as a dependency to my gem). > > When you say "ruby 1.8.7 (2009-12-24 patchlevel 248)" has this > each_slice(), it doesn't yet help me. I have enough confidence that if not all at least most versions (especially newer versions) have that feature. So I would place 1.8.7 as dependency. I'd say you are pretty safe since the newest versions definitively have it and the percentage of old 1.8.7 versions installed is probably rather low. My 0.02EUR. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/