Ruby: How to 'next' an external loop?
Posted
by Zombies
on Stack Overflow
See other posts from Stack Overflow
or by Zombies
Published on 2010-03-08T19:14:19Z
Indexed on
2010/03/08
19:51 UTC
Read the original article
Hit count: 189
file.each_line do |line|
#skip the first one/not a user
3.times { next } if first == 1
first = 2
end
How can I get the 'next' to well, "next" the iteration of the each_line, instead of the 3.times iteration? Also, how can I write this to look better (ie: first == 1 looks bad)
© Stack Overflow or respective owner