Ejemplo n.º 1
0
        private static int skip_file_header(Frame caller, IO f, out string line)
        {
            int line_start = 1;

            while ((line = f.ReadLine(caller)) != null)
            {
                line_start++;
                if (line.StartsWith("#!") && line.Contains("ruby"))
                    return line_start;
            }
            throw new LoadError("No Ruby script found in input").raise(caller);
        }