lib/file: once some global constants
authorJean Privat <jean@pryen.org>
Mon, 6 Apr 2015 15:10:17 +0000 (22:10 +0700)
committerJean Privat <jean@pryen.org>
Thu, 9 Apr 2015 13:47:27 +0000 (20:47 +0700)
Signed-off-by: Jean Privat <jean@pryen.org>

lib/standard/file.nit

index 42eca14..bb87a6f 100644 (file)
@@ -252,14 +252,14 @@ redef class Int
 end
 
 # Constant for read-only file streams
-private fun read_only: NativeString do return "r".to_cstring
+private fun read_only: NativeString do return once "r".to_cstring
 
 # Constant for write-only file streams
 #
 # If a stream is opened on a file with this method,
 # it will wipe the previous file if any.
 # Else, it will create the file.
-private fun wipe_write: NativeString do return "w".to_cstring
+private fun wipe_write: NativeString do return once "w".to_cstring
 
 ###############################################################################