@JRubyMethod(name = "load_documents", required = 1, frame = true, module = true, visibility = Visibility.PRIVATE)
public static IRubyObject load_documents(IRubyObject self, IRubyObject arg, Block block) {
boolean debug = self.getRuntime().getDebug().isTrue();
ThreadContext context = self.getRuntime().getCurrentContext();
IRubyObject io = check_yaml_port(arg);
Scanner scn = null;
try {
if(io instanceof RubyString) {
scn = debug ? new PositioningScannerImpl(((RubyString)io).getByteList()) : new ScannerImpl(((RubyString)io).getByteList());
} else {
scn = debug ? new PositioningScannerImpl(new IOInputStream(io)) : new ScannerImpl(new IOInputStream(io));