in reply to err, i miscounted
in thread Is Perl less compact than Ruby? (Kind of competition)

If you are going to choose where to put your newline then the Ruby is 356:
n=[];p=$<.readlines;f=l=c=0;loop{p[l].downcase.each_byte{|y|f>0?$6?(n< +<c;c=f=0): c="htaoins".index(y)+c*7: $1?n<<l+2: $2?n<<STDIN.getc: $3?f=1:(a=n.pop +;$4?$><<a. chr: $5?(n<<n[n.size-a.abs-1];a>0?n.delete_at(n.size-a-2):1):(b=n.pop; +$6?(n<<b/a ;n<<b%a): $7?n<<b-a: b!=0?(l=a-2;break):1))if y.chr=~ "(a)|(i)|(n)|(o)|(h)|(e)|(s)|(t)"};break if(l+=1)>=p.size||l<0}
... but I'm sure you can find one more byte... Stephen