The meaning of this 'next if ... || if ... end' is very confusing and hard to read, imo.

What you are saying is: Next if typename is nil *or* the expression returned by `if typename[0,1] != "#" .... end` and it reads very strangely. If you intend to do an inline `next if ...` then it must be one line only, not 4 lines ;)