Tomoyuki Sahara
caab1c203c
define IO#hash to override Enumerable#hash. fixes #73 .
...
Current implementation of Enumerable#hash calls #each to collect
hash values of enumerated objects (then calculates the hash value
of the Enumerable object). But IO#each is a method to read lines.
It is not expected that IO#hash reads all lines from the IO object.
Or even worse, program waits for the IO object to be readable if
it is a socket or something cannot be read immediately.
2017-02-08 18:31:50 +09:00
Tomoyuki Sahara
f6a82772e6
eof? should raise an IOError if it is not opened for reading.
2016-09-30 17:10:55 +09:00
Tomoyuki Sahara
2229a2aa0f
reimplement #eof. fixes #66 .
2016-09-30 16:27:11 +09:00
Tomoyuki Sahara
b341ee7c12
Merge pull request #63 from ksss/opt
...
Enable option :in, :out, :err to IO.popen
2016-08-08 10:12:20 +09:00
ksss
b462ef4506
Enable option :in, :out, :err
2016-08-07 21:21:01 +09:00
ksss
4cac5e9c70
Should use global variable
2016-08-06 23:11:31 +09:00
Tomoyuki Sahara
2af2a4fff8
add IO#isatty and IO#tty?
2016-06-21 09:49:34 +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
ksss
a55accd736
Implement IO.pipe
2015-11-24 14:24:24 +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
Tomoyuki Sahara
3a97a453c4
rewrite IO.for_fd.
...
IO.for_fd should call IO#initialize to initialize the created object
properly. It cannot be implemented in Ruby.
2014-12-26 11:09:07 +09:00
TOMITA Masahiro
42752bffce
FIX: IO#read create a large number of objects.
2014-12-18 00:41:59 +09:00
Tomoyuki Sahara
e82c1d3f38
Revert "FIX: IO#read create a large number of objects."
2014-12-17 13:37:15 +09:00
TOMITA Masahiro
9b13a59a55
FIX: IO#read create a large number of objects.
2014-12-17 01:46:23 +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
e5f30f83ce
IO#flush should raise an exception if it is closed.
2014-04-21 10:01:49 +09:00
Tomoyuki Sahara
810e37b1c3
return value of syswrite may be less than length of given string.
2014-04-17 15:45:31 +09:00
Tomoyuki Sahara
56a8c592dd
add IO.read
2014-02-25 12:19:52 +09:00
Tomoyuki Sahara
daa65c15de
add dummy IO#flush for better compatibility with CRuby.
2014-02-12 16:33:34 +09:00
Tomoyuki Sahara
47a610e688
use array parameter on IO.open.
2013-08-30 19:09:36 +09:00
Tomoyuki Sahara
713aa48cf9
STDERR's file descriptor is 2.
...
closes #1
2013-08-30 17:04:40 +09:00
Akira Yumiyama
1272df7cb6
fix IO#eof? method (consider the read buffer)
2013-06-02 13:24:34 +09:00
Akira Yumiyama
df529a83d6
add $stdin $stdout $stderr STDIN STDOUT STDERR
2013-05-08 20:22:29 +09:00
Akira Yumiyama
7a94d02e8d
add IO#print
2013-05-08 20:22:14 +09:00
Akira Yumiyama
e8ca5e5169
initial commit
2013-04-01 09:12:01 +09:00