General

Profile

shock_one (Володимир Шацький)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 0 1

Activity

01/05/2013

12:52 AM Ruby Feature #7654: Add optional code block to IO::readlines
Thank you, Eregon, especially for in place methods. I should definitely pay more attention to them - functional languages made me a little suspicious of this sort of things.
But I still think it would be nice to have an optional block i...
shock_one (Володимир Шацький)

01/04/2013

10:27 PM Ruby Feature #7654: Add optional code block to IO::readlines
Just to be clear: code block will allow to write the first code snippet as follows:
data = File.readlines('/home/shock_one/test.rb'){ |line| line.upcase }
shock_one (Володимир Шацький)
10:15 PM Ruby Feature #7654 (Assigned): Add optional code block to IO::readlines
Of course, we always can write something like
File.readlines('/home/shock_one/test.rb').map{ |line| line.upcase }
but this way we create unneeded intermediate array which can be pretty big.
There is also a method IO::foreach, but it d...
shock_one (Володимир Шацький)

Also available in: Atom