core/src/main/java/org/jruby/RubyDir.java
@JRubyMethod(name = "read")
    public IRubyObject read() {
        checkDir();

        final String[] snapshot = this.snapshot;
        if (pos >= snapshot.length) return getRuntime().getNil();

        RubyString result = RubyString.newString(getRuntime(), snapshot[pos], encoding);
        pos++;
        return result;
    }
/** Returns the next entry from this directory. */
Returns the next entry from this directory.
Returns the next entry from this directory .
@JRubyMethod(name = "read")
    public IRubyObject read() {
        checkDir();
        final String[] snapshot = this.snapshot;
        if (pos >= snapshot.length) return getRuntime().getNil();
        RubyString result = RubyString.newString(getRuntime(), snapshot[pos], encoding);
        pos++;
        return result;
    }
@ JRubyMethod ( name = "read" ) public IRubyObject read ( ) { checkDir ( ) ; final String [ ] snapshot = this . snapshot ; if ( pos >= snapshot . length ) return getRuntime ( ) . getNil ( ) ; RubyString result = RubyString . newString ( getRuntime ( ) , snapshot [ pos ] , encoding ) ; pos ++ ; return result ; }
Returns the next entry from this directory.
Returns the next entry from this directory .