Commit Graph

47 Commits

Author SHA1 Message Date
ksss d2c1f4d10b Enable Fixnum option 2016-08-07 22:19:21 +09:00
ksss b462ef4506 Enable option :in, :out, :err 2016-08-07 21:21:01 +09:00
Tomoyuki Sahara 93d481d4b4 update $? when IO object is closed. closes #58. 2016-06-22 10:29:49 +09:00
Tomoyuki Sahara e90ecff671 Merge pull request #60 from drbrain/test_io_setup_failure
Test io setup failure
2016-06-21 09:52:30 +09:00
Tomoyuki Sahara 2af2a4fff8 add IO#isatty and IO#tty? 2016-06-21 09:49:34 +09:00
Eric Hodel 11961b42ac Create socket in /tmp for security
Some systems do not allow UNIX sockets from arbitrary directories.
Instead of trying to `#define SOCKET_PATH` correctly I assume the /tmp/
directory is accessible and use it.
2016-05-12 17:55:14 -07:00
Eric Hodel 777cf70cc5 Include reason in test failure message
I am seeing this test fail in some environments but can't determine why.
The extra information will help me determine the reason bind(2) is
failing.
2016-05-12 16:02:09 -07:00
Tomoyuki Sahara 99e10b8dc4 File::ALT_SEPARATOR is always defined (some string or nil). 2015-12-08 16:44:13 +09:00
takahashim dd754220ce Fix for windows(mingw)
* File.expand_path: support drive letter and ALT_SEPARATOR

* File.dirname: support ALT_SEPARATOR
* File.basename: ditto.

* IO.popen: raise NotImplementedError
* IO.pipe: ditto.
* `cmd`:  ditto.
* File#flock: ditto.
* FileTest.pipe?: ditto.
* FileTest.symlink?: ditto.
* FileTest.socket?: ditto.
2015-12-08 00:29:42 +09:00
takahashim b19c315148 fix tests for Win: use binary mode 2015-12-02 21:47:46 +09:00
takahashim 07ceb138fa build on Win32 2015-12-02 00:10:43 +09:00
Tomoyuki Sahara 11ffb93852 assert_nothing_raised is not available on mruby 1.0.0. 2015-11-24 17:00:12 +09:00
ksss a55accd736 Implement IO.pipe 2015-11-24 14:24:24 +09:00
takahashim 2cc674e58e add File.symlink 2015-11-22 13:13:52 +09:00
takahashim 44473fecdd add File.path 2015-11-21 22:03:40 +09:00
Tomoyuki Sahara 21963f8fa1 UT for IO#sysseek. 2015-10-20 15:37:05 +09:00
takahashim 9bbfc38bb4 add IO#rewind 2015-09-27 21:25:06 +09:00
takahashim c26f998ed5 support IO#<< 2015-09-27 00:29:17 +09:00
ksss e61c469724 IO.popen fd set close_on_exec flag by default 2014-12-04 10:25:03 +09:00
ksss 9439b981d8 Opened fd should be set FD_CLOEXEC by default 2014-12-04 10:25:03 +09:00
ksss a44ada616e Implement FileTest.size
- File.size delegate to FileTest.size
- File.size more faster by reading i-node value
2014-11-16 14:55:45 +09:00
Tomoyuki Sahara e60951a305 add IO#sync and IO#sync= 2014-07-29 10:55:02 +09:00
dreamedge 78f5f98710 delete debug messages 2014-07-09 05:29:20 +09:00
dreamedge 7e689e8680 Add IO#close_on_exec=
and a test on test/io.rb
2014-07-08 15:56:56 +09:00
Tomoyuki Sahara ddfc4eb5ef IO#read(0) should return "" immediately. fixes iij/mruby-socket#13. 2014-06-19 09:57:08 +09:00
Tomoyuki Sahara 9c00de59ce IO.for_fd can be written in Ruby. 2014-04-21 10:24:59 +09:00
Tomoyuki Sahara c46cb1b5eb more tests. 2014-04-21 10:02:25 +09:00
Tomoyuki Sahara 36045ea96f IO#syswrite should raise an error if it's not opened for writing. 2014-04-18 11:20:55 +09:00
Tomoyuki Sahara 87ce12dfe3 io.write("") -> 0 2014-04-17 15:53:51 +09:00
Masaki Muranaka 706ef1337a Don't ignore the return value of symlink(). 2014-04-05 10:44:47 +09:00
Akira Yumiyama eda9d1a8fc nonexistent test fixes (for travis-ci) 2014-03-26 22:09:10 +09:00
Tomoyuki Sahara ab9dcc766e IO.close should be IO._sysclose. closes #13. 2014-03-26 17:22:57 +09:00
Tomoyuki Sahara 56a8c592dd add IO.read 2014-02-25 12:19:52 +09:00
Tomoyuki Sahara 87d878292d Try GC when Too many open files (revert a part of 1e8097a). 2013-11-16 16:04:31 +09:00
Tomoyuki Sahara e44da8a6cc test for #6. 2013-11-16 05:44:04 +09:00
Tomoyuki Sahara 93edd26b3e fix typo... 2013-10-09 00:35:22 +09:00
Tomoyuki Sahara 005f01f2fc fix RSTRING_PTR usage. 2013-10-03 12:18:39 +09:00
Tomoyuki Sahara b4f0a68fba add File#flock. 2013-09-30 10:17:21 +09:00
Tomoyuki Sahara 140da1c6ca remove duplicated white spaces. 2013-09-26 18:31:02 +09:00
Paolo Bosetti c4e3c46e86 Catch up with API changes on mrb_intern() -> mrb_intern_cstr() 2013-09-25 13:26:49 +02:00
Tomoyuki Sahara 47a610e688 use array parameter on IO.open. 2013-08-30 19:09:36 +09:00
Tomoyuki Sahara 9dc875f246 add cmd (command output expression). 2013-08-23 16:00:08 +09:00
Tomoyuki Sahara 5e8021bedb tests for File.socket? and File.symlink? 2013-08-08 14:00:02 +09:00
Akira Yumiyama c25d386c41 Use mkstemp instead of mktemp. 2013-05-12 13:15:11 +09:00
Akira Yumiyama 814f3305ca put MRB_ prefix before ARGS_XXX macros 2013-04-27 10:09:05 +09:00
Akira Yumiyama da557fbc82 add File.expand_path 2013-04-07 01:55:18 +09:00
Akira Yumiyama e8ca5e5169 initial commit 2013-04-01 09:12:01 +09:00