Skip to content

Commit 6edb3ab

Browse files
committed
[Truffle] Some IO constants.
1 parent 1d72dee commit 6edb3ab

File tree

8 files changed

+16
-39
lines changed

8 files changed

+16
-39
lines changed

spec/truffle/tags/rubysl/rubysl-stringio/spec/external_encoding_tags.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

spec/truffle/tags/rubysl/rubysl-stringio/spec/initialize_tags.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

spec/truffle/tags/rubysl/rubysl-stringio/spec/internal_encoding_tags.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
fails:StringIO.open when passed [Object, mode] allows passing the mode as an Integer
21
fails:StringIO.open when passed [Object, mode] raises a TypeError when passed a frozen String in truncate mode as StringIO backend
3-
fails:StringIO.open when passed [Object, mode] raises a RuntimeError when passed a frozen String in truncate mode as StringIO backend
4-
fails:StringIO.open when passed no arguments yields self to the passed block
5-
fails:StringIO.open when passed no arguments sets the mode to read-write
6-
fails:StringIO.open when passed no arguments uses an empty String as the StringIO backend

spec/truffle/tags/rubysl/rubysl-stringio/spec/puts_tags.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1 @@
1-
fails:StringIO#reopen when passed [Object, Integer] reopens self with the passed Object in the passed mode
2-
fails:StringIO#reopen when passed [Object, Integer] does not taint self when the passed Object was tainted
3-
fails:StringIO#reopen when passed [Object, Integer] tries to convert the passed Object to a String using #to_str
4-
fails:StringIO#reopen when passed [Object, Integer] raises a TypeError when the passed Object can't be converted to a String
5-
fails:StringIO#reopen when passed [Object, Integer] raises an Errno::EACCES when trying to reopen self with a frozen String in write-mode
61
fails:StringIO#reopen when passed [Object, Integer] raises a TypeError when trying to reopen self with a frozen String in truncate-mode
7-
fails:StringIO#reopen when passed [Object, Integer] raises a RuntimeError when trying to reopen self with a frozen String in truncate-mode
8-
fails:StringIO#reopen when passed [Object, Integer] does not raise IOError when passed a frozen String in read-mode
9-
fails:StringIO#reopen does not truncate the content even when the StringIO argument is in the truncate mode

spec/truffle/tags/rubysl/rubysl-stringio/spec/set_encoding_tags.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

truffle/src/main/ruby/core/shims.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,19 @@ def num_bytes=(count)
212212
end
213213

214214
end
215+
216+
class IO
217+
218+
RDONLY = 0
219+
WRONLY = 1
220+
RDWR = 2
221+
222+
CREAT = 512
223+
EXCL = 2048
224+
NOCTTY = 131072
225+
TRUNC = 1024
226+
APPEND = 8
227+
NONBLOCK = 4
228+
SYNC = 128
229+
230+
end

0 commit comments

Comments
 (0)