# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: C:\Documents and Settings\tiziano\jruby\src\org\jruby
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: RubyIO.java
--- RubyIO.java Base (BASE)
+++ RubyIO.java Locally Modified (Based On LOCAL)
@@ -1038,9 +1038,9 @@
     	Arity.checkArgumentCount(getRuntime(), args, 0, -1);
         
     	ThreadContext context = getRuntime().getCurrentContext();
-        
+        String eol = System.getProperty("line.separator","\n");
         if (args.length == 0) {
-            callMethod(context, "write", getRuntime().newString("\n"));
+            callMethod(context, "write", getRuntime().newString(eol));
             return getRuntime().getNil();
         }
 
@@ -1060,8 +1060,8 @@
             
             callMethod(context, "write", getRuntime().newString(line));
             
-            if (!line.endsWith("\n")) {
-                callMethod(context, "write", getRuntime().newString("\n"));
+            if (!line.endsWith(eol)) {
+                callMethod(context, "write", getRuntime().newString(eol));
             }
         }
         return getRuntime().getNil();

