diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ConnectionFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ConnectionFunctions.java index eb61710d5e4fa123dbfb62a8b509f1215917d241..74c1128cc92dac05607e393db1f8ffcd5ede5c3c 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ConnectionFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ConnectionFunctions.java @@ -345,7 +345,7 @@ public abstract class ConnectionFunctions { Casts casts = new Casts(TextConnection.class); CastsHelper.description(casts); casts.arg("text").allowNull().mustBe(stringValue()); - CastsHelper.open(casts).mustBe(equalTo("").or(equalTo("r").or(equalTo("w").or(equalTo("a")))), RError.Message.UNSUPPORTED_MODE); + CastsHelper.open(casts).mustBe(equalTo("").or(equalTo("r").or(equalTo("w").or(equalTo("a").or(equalTo("wr"))))), RError.Message.UNSUPPORTED_MODE); casts.arg("env").mustNotBeNull(RError.Message.USE_NULL_ENV_DEFUNCT).mustBe(instanceOf(REnvironment.class)); casts.arg("encoding").asIntegerVector().findFirst().mustNotBeNA(); } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/ConnectionSupport.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/ConnectionSupport.java index d60b9779df596070a35d174b733b3aeecdf37d55..5bbff2e39bac2b7d38b8bdcbdbac458a4326b703 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/ConnectionSupport.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/ConnectionSupport.java @@ -222,7 +222,7 @@ public class ConnectionSupport { enum AbstractOpenMode { Lazy(new String[]{""}, true, true, true), Read(new String[]{"r", "rt"}, true, true, false), - Write(new String[]{"w", "wt"}, true, false, true), + Write(new String[]{"w", "wt", "wr"}, true, false, true), Append(new String[]{"a", "at"}, true, false, true), ReadBinary(new String[]{"rb"}, false, true, false), WriteBinary(new String[]{"wb"}, false, false, true),