->n{i=0;loop{p i+=1;i<n||break}} # 32 bytes f=->n,i=1{i>n||p(i)&&f[n,i+1]} # 30 bytes ->n,i=0{p(i+=1)<n&&redo} # 24 bytes ->n{i=0;p i+=1while i<n} # 24 bytes ->n{i=0;eval"p i+=1;"*n} # 24 bytes ->n{n.times{|i|p i+1}} # 22 bytes # thanks to @benj2240 ->n{n.times{p _1+1}} # 20 bytes # thanks to @AgentIvan 22 (`->n{n.times{|i|p i+1}}`) -> 20(`->n{n.times{p _1+1}}`) characters