@@ -1067,19 +1067,19 @@ public IRubyObject putc(ThreadContext context, IRubyObject ch) {
10671067
10681068 public static final ByteList NEWLINE = ByteList .create ("\n " );
10691069
1070- @ JRubyMethod (name = "read" )
1070+ @ JRubyMethod (name = "read" ) // strio.read()
10711071 public IRubyObject read (ThreadContext context ) {
10721072 return readCommon (context , 0 , null , null );
10731073 }
10741074
1075- @ JRubyMethod (name = "read" )
1076- public IRubyObject read (ThreadContext context , IRubyObject arg0 ) {
1077- return readCommon (context , 1 , arg0 , null );
1075+ @ JRubyMethod (name = "read" ) // // strio.read([length)
1076+ public IRubyObject read (ThreadContext context , IRubyObject length ) {
1077+ return readCommon (context , 1 , length , null );
10781078 }
10791079
1080- @ JRubyMethod (name = "read" )
1081- public IRubyObject read (ThreadContext context , IRubyObject arg0 , IRubyObject arg1 ) {
1082- return readCommon (context , 2 , arg0 , arg1 );
1080+ @ JRubyMethod (name = "read" ) // strio.read(length, outbuf)
1081+ public IRubyObject read (ThreadContext context , IRubyObject length , IRubyObject outbuf ) {
1082+ return readCommon (context , 2 , length , outbuf );
10831083 }
10841084
10851085 @ SuppressWarnings ("fallthrough" )
@@ -1102,7 +1102,7 @@ private IRubyObject readCommon(ThreadContext context, int argc, IRubyObject arg0
11021102 str = arg1 ;
11031103 if (!str .isNil ()) {
11041104 str = str .convertToString ();
1105- ((RubyString ) str ). modify ( );
1105+ modifyString ((RubyString ) str );
11061106 }
11071107 case 1 :
11081108 if (!arg0 .isNil ()) {
@@ -1198,7 +1198,7 @@ private RubyString preadCommon(ThreadContext context, int argc, IRubyObject arg0
11981198 str = arg2 ;
11991199 if (!str .isNil ()) {
12001200 str = str .convertToString ();
1201- ((RubyString ) str ). modify ( );
1201+ modifyString ((RubyString ) str );
12021202 }
12031203 case 2 :
12041204 len = RubyNumeric .fix2int (arg0 );
0 commit comments