core/src/main/java/org/jruby/RubyArgsFile.java
@JRubyMethod(name = "each_line", optional = 1)
    public static IRubyObject each_line(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
        if (!block.isGiven()) return enumeratorize(context.runtime, recv, "each_line", args);

        ArgsFileData data = ArgsFileData.getArgsFileData(context.runtime);

        if (!data.next_argv(context)) return context.nil;

        if (!(data.currentFile instanceof RubyIO)) {
            if (!data.next_argv(context)) return recv;

            data.currentFile.callMethod(context, "each", NULL_ARRAY, block);
            data.next_p = 1;
        }

        IRubyObject str;
        while ((str = argf_getline(context, recv, args)) != context.nil) {
        	block.yield(context, str);
        }

        return recv;
    }
/** Invoke a block for each line.
     *
     */
Invoke a block for each line.
Invoke a block for each line .
@JRubyMethod(name = "each_line", optional = 1)
    public static IRubyObject each_line(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
        if (!block.isGiven()) return enumeratorize(context.runtime, recv, "each_line", args);
        ArgsFileData data = ArgsFileData.getArgsFileData(context.runtime);
        if (!data.next_argv(context)) return context.nil;
        if (!(data.currentFile instanceof RubyIO)) {
            if (!data.next_argv(context)) return recv;
            data.currentFile.callMethod(context, "each", NULL_ARRAY, block);
            data.next_p = 1;
        }
        IRubyObject str;
        while ((str = argf_getline(context, recv, args)) != context.nil) {
        	block.yield(context, str);
        }
        return recv;
    }
@ JRubyMethod ( name = "each_line" , optional = 1 ) public static IRubyObject each_line ( ThreadContext context , IRubyObject recv , IRubyObject [ ] args , Block block ) { if ( ! block . isGiven ( ) ) return enumeratorize ( context . runtime , recv , "each_line" , args ) ; ArgsFileData data = ArgsFileData . getArgsFileData ( context . runtime ) ; if ( ! data . next_argv ( context ) ) return context . nil ; if ( ! ( data . currentFile instanceof RubyIO ) ) { if ( ! data . next_argv ( context ) ) return recv ; data . currentFile . callMethod ( context , "each" , NULL_ARRAY , block ) ; data . next_p = 1 ; } IRubyObject str ; while ( ( str = argf_getline ( context , recv , args ) ) != context . nil ) { block . yield ( context , str ) ; } return recv ; }
Invoke a block for each line.
Invoke a block for each line .