Skip to content

Commit

Permalink
[Truffle] Added the 'tmpdir' standard library.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvdrum committed Apr 15, 2015
1 parent 3baecaa commit 470e578
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/tmpdir.rb
@@ -0,0 +1 @@
require_relative '../../stdlib/tmpdir'
9 changes: 9 additions & 0 deletions spec/truffle/tags/library/tmpdir/dir/mktmpdir_tags.txt
@@ -0,0 +1,9 @@
fails:Dir.mktmpdir when passed no arguments returns the path to the created tmp-dir
fails:Dir.mktmpdir when passed no arguments creates a new writable directory in the path provided by Dir.tmpdir
fails:Dir.mkdir when passed a block yields the path to the passed block
fails:Dir.mkdir when passed a block creates the tmp-dir before yielding
fails:Dir.mkdir when passed a block removes the tmp-dir after executing the block
fails:Dir.mkdir when passed a block returns the blocks return value
fails:Dir.mktmpdir when passed [String] uses the passed String as a prefix to the tmp-directory
fails:Dir.mktmpdir when passed [Array] uses the first element of the passed Array as a prefix and the scond element as a suffix to the tmp-directory
fails:Dir.mktmpdir when passed [Object] raises an ArgumentError
1 change: 1 addition & 0 deletions spec/truffle/tags/library/tmpdir/dir/tmpdir_tags.txt
@@ -0,0 +1 @@
fails:Dir.tmpdir returns the path to a writable and readable directory
1 change: 1 addition & 0 deletions spec/truffle/truffle.mspec
Expand Up @@ -99,6 +99,7 @@ class MSpecScript
"spec/ruby/library/strscan",
"spec/ruby/library/stringio",
"spec/ruby/library/thread",
"spec/ruby/library/tmpdir",
"spec/ruby/library/uri",

# Load issues with 'delegate'.
Expand Down

0 comments on commit 470e578

Please sign in to comment.