From: James Edward Gray II Date: 2007-11-27T03:48:49+09:00 Subject: Re: Read last line of a file On Nov 21, 2007, at 10:26 PM, Peņa, Botp wrote: > wc reminds me, i'm looking for a gem that reverses the behaviour of > string/collection/io/ traversals, like > #array reverse > %w(this is a test).each.in_reverse {|x| p x} > test > a > is > this This can be hard to support for all iterators, but Array does have reverse_each(): >> %w[this is a test].reverse_each { |word| puts word } test a is this => ["this", "is", "a", "test"] James Edward Gray II