Each_byte and break

each_byte e$B$+$ie(B break [email protected]$b$N$,$^$?FI$a$k$3$H$,$"$je(B
e$B$^$9!#e(B

% echo abcdef |./ruby -ve ‘STDIN.each_byte {|b| p b; break if b == 100
}; p STDIN.read’
ruby 1.9.0 (2007-08-27 patchlevel 0) [i686-linux]
97
98
99
100
“abcdef\n”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs