Skip to content

Commit

Permalink
[Truffle] Some IO constants.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseaton committed Mar 14, 2015
1 parent 1d72dee commit 6edb3ab
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 39 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions spec/truffle/tags/rubysl/rubysl-stringio/spec/open_tags.txt
@@ -1,6 +1 @@
fails:StringIO.open when passed [Object, mode] allows passing the mode as an Integer
fails:StringIO.open when passed [Object, mode] raises a TypeError when passed a frozen String in truncate mode as StringIO backend
fails:StringIO.open when passed [Object, mode] raises a RuntimeError when passed a frozen String in truncate mode as StringIO backend
fails:StringIO.open when passed no arguments yields self to the passed block
fails:StringIO.open when passed no arguments sets the mode to read-write
fails:StringIO.open when passed no arguments uses an empty String as the StringIO backend
16 changes: 0 additions & 16 deletions spec/truffle/tags/rubysl/rubysl-stringio/spec/puts_tags.txt

This file was deleted.

8 changes: 0 additions & 8 deletions spec/truffle/tags/rubysl/rubysl-stringio/spec/reopen_tags.txt
@@ -1,9 +1 @@
fails:StringIO#reopen when passed [Object, Integer] reopens self with the passed Object in the passed mode
fails:StringIO#reopen when passed [Object, Integer] does not taint self when the passed Object was tainted
fails:StringIO#reopen when passed [Object, Integer] tries to convert the passed Object to a String using #to_str
fails:StringIO#reopen when passed [Object, Integer] raises a TypeError when the passed Object can't be converted to a String
fails:StringIO#reopen when passed [Object, Integer] raises an Errno::EACCES when trying to reopen self with a frozen String in write-mode
fails:StringIO#reopen when passed [Object, Integer] raises a TypeError when trying to reopen self with a frozen String in truncate-mode
fails:StringIO#reopen when passed [Object, Integer] raises a RuntimeError when trying to reopen self with a frozen String in truncate-mode
fails:StringIO#reopen when passed [Object, Integer] does not raise IOError when passed a frozen String in read-mode
fails:StringIO#reopen does not truncate the content even when the StringIO argument is in the truncate mode

This file was deleted.

16 changes: 16 additions & 0 deletions truffle/src/main/ruby/core/shims.rb
Expand Up @@ -212,3 +212,19 @@ def num_bytes=(count)
end

end

class IO

RDONLY = 0
WRONLY = 1
RDWR = 2

CREAT = 512
EXCL = 2048
NOCTTY = 131072
TRUNC = 1024
APPEND = 8
NONBLOCK = 4
SYNC = 128

end

0 comments on commit 6edb3ab

Please sign in to comment.