diff --git a/src/org/jruby/RubyIO.java b/src/org/jruby/RubyIO.java index ca03a5e375d..ba1ebe9d146 100644 --- a/src/org/jruby/RubyIO.java +++ b/src/org/jruby/RubyIO.java @@ -3056,7 +3056,12 @@ public static IRubyObject read(ThreadContext context, IRubyObject recv, IRubyObj try { if (!arg1.isNil()) { - return file.read(context, arg1); + if (arg1 instanceof RubyInteger) { + return file.read(context, arg1); + } else { + // TODO: hash args for encoding, etc, are not yet supported; ignore + return file.read(context); + } } else { return file.read(context); }