nobu
50d1f54d4d
* io.c (nogvl_copy_stream_read_write, copy_stream_body): use size_t.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12 10:40:33 +00:00
nobu
d1abc53721
* array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,
...
numeric.c, pack.c, strftime.c, string.c, thread.c, transcode.c,
transcode_data.h, util.c, variable.c, vm_dump.c,
include/ruby/encoding.h, missing/crypt.c, missing/vsnprintf.c:
suppress VC type warnings. [ruby-core:22726]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12 09:16:15 +00:00
nobu
748ed24234
* io.c (copy_stream_fallback_body): off_t may be larger than long.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-11 20:22:52 +00:00
usa
2c288bf91f
* include/ruby/win32.h (rb_w32_wopen): prototype forgotten.
...
* io.c (rb_sysopen_internal): shouldn't replace undefined chars in this
case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-26 01:58:20 +00:00
usa
a898f0fb4b
* io.c (sysopen_func, rb_sysopen_internal, rb_sysopen): open file
...
by UTF-16'ed filename on Windows.
* io.c (rb_file_open_generic, rb_io_s_sysopen, rb_io_reopen,
argf_next_argv): follow above change.
* io.c (rb_scan_open_args): no longer need to convert filepath here on
Windows.
* win32/wio32.c (rb_w32_wopen): new function to open file by UTF-16'ed
filename.
* win32/win32.c (rb_w32_open): call rb_w32_open().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25 08:36:45 +00:00
nobu
ac9d09ba3c
* io.c (rb_io_getline_1): enables limit even if rs is given.
...
[ruby-core:22434]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25 03:06:12 +00:00
akr
2e0a20d3e2
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 16:22:28 +00:00
nobu
12d2c8ba41
stripped trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 14:23:33 +00:00
akr
9cfe35ad50
* io.c (io_getpartial): error message describes what should be
...
waited after nonblocking error.
(rb_io_write_nonblock): ditto.
* ext/socket/init.c (s_recvfrom_nonblock): ditto.
(s_accept_nonblock): ditto.
* ext/socket/socket.c (sock_connect_nonblock): ditto.
* ext/socket/ancdata.c (bsock_sendmsg_internal): ditto.
(bsock_recvmsg_internal): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21 15:57:52 +00:00
nobu
30231731a9
* io.c (pipe_open): sarg is always used unless HAVE_FORK.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-18 06:33:53 +00:00
nobu
3229c32008
* io.c (rb_write_error2, argf_next_argv), process.c (rb_fork_err),
...
random.c (fill_random_seed): suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-18 06:21:04 +00:00
naruse
646e2efaef
* io.c (io_encoding_set): ignore second argument when external and
...
internal are same. [ruby-dev:37939]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 02:35:38 +00:00
nobu
25d14edf29
* io.c (rb_io_s_binread): ensures file path. [ruby-dev:37940]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 09:34:46 +00:00
akr
a0b54e6cbd
* io.c (io_fread): use rb_io_wait_readable for retry
...
avoid Errno::EINTR on ruby -e 'trap(:CHLD) {}; spawn("sleep 1"); STDIN.read'
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 14:46:21 +00:00
azav
71dd792128
(pipe_open) [__SYMBIAN32__]: fixed compile time error
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 13:31:20 +00:00
akr
74063bf4d3
* include/ruby/intern.h (rb_run_exec_options_err): renamed from
...
rb_run_exec_options.
(rb_exec_err): renamed from rb_exec.
(rb_fork_err): renamed from rb_fork.
(rb_spawn_err): renamed from rb_spawn.
(rb_run_exec_options): declared with 1.9.1 compatible signature.
(rb_exec): ditto.
(rb_fork): ditto.
(rb_spawn): ditto.
* process.c (rb_run_exec_options_err): renamed from
rb_run_exec_options.
(rb_exec_err): renamed from rb_exec.
(rb_fork_err): renamed from rb_fork.
(rb_spawn_err): renamed from rb_spawn.
(rb_run_exec_options): defined.
(rb_exec): ditto.
(rb_fork): ditto.
(rb_spawn): ditto.
* io.c: follow above change.
* ext/pty/pty.c: follow above change.
[ruby-dev:37893]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 11:33:19 +00:00
akr
28e33ad61e
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04 12:58:55 +00:00
akr
4a3e62b383
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-31 05:12:23 +00:00
usa
9e83ce20b1
* revert previous revision. it's already out-of-date.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-22 07:13:40 +00:00
usa
a3e8d63a75
* include/ruby/win32.h, win32/win32.c (rb_w32_is_valid_fd): new function
...
to validate fd.
* io.c (rb_io_initialize): check fd with above function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-22 06:55:20 +00:00
nobu
938fcd6b70
* io.c (rb_io_ungetbyte, rb_io_ungetc): allows nil to reset EOF
...
flag with ungetting nothing.
* ruby.c (load_file_internal): rests EOF flag to make possible to
load from stdin after reading data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-21 12:42:39 +00:00
nobu
237c54075a
* io.c (rb_io_ungetbyte, rb_io_ungetc): clears EOF flag.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-21 06:31:03 +00:00
nobu
877dca1e27
* include/ruby/io.h (typedef struct rb_io_t):
...
* io.c (flush_before_seek):
* io.c (io_fillbuf):
* io.c (io_fread):
* io.c (io_getpartial):
* ruby.c (load_file_internal):
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-21 04:56:06 +00:00
akr
c157583627
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15 13:45:06 +00:00
usa
4430438c66
* io.c (pipe_open): revert a part of previous commit. it may be a
...
mistake.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15 02:41:38 +00:00
matz
c6af6b1b94
* symbian/README.SYMBIAN: symbian support added. great appreciate
...
to <alexandre.zavorine at symbian.com>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15 01:53:08 +00:00
nobu
96a49b1ada
* io.c (rb_io_wait_readable, rb_io_wait_writable): need rb_fd_ptr.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14 03:39:20 +00:00
nobu
ff80e84db9
* io.c (appendline): reformed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14 03:38:06 +00:00
nobu
d4beba3f3e
* io.c (rb_io_s_pipe): reduced nest of rb_ensure of main block.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14 03:35:25 +00:00
usa
be551172ed
* io.c (io_reopen, rb_io_init_copy): should register fptr to pipe_list
...
when copying pipe fptr.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 12:45:43 +00:00
usa
c4554d20a6
* io.c (rb_io_close_read): call rb_io_fptr_cleanup() instead of
...
fptr_finalize() because the fptr has special finalizser if it is a
pipe. [ruby-dev:37757] (3)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 09:23:54 +00:00
usa
fbc4429d72
* io.c (rb_io_initialize): workaround for Windows. [ruby-dev:37686]
...
(also see [ruby-dev:37721])
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 09:21:14 +00:00
akr
e6045986ef
* io.c (rb_close_before_exec): more heuristics to detect maximum fd.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 15:35:21 +00:00
akr
1dfea33652
* io.c (maygvl_copy_stream_wait_read): renamed to add prefix to
...
express GVL state.
(nogvl_copy_stream_wait_write): ditto.
(nogvl_copy_stream_sendfile): ditto.
(maygvl_copy_stream_read): ditto.
(nogvl_copy_stream_write): ditto.
(nogvl_copy_stream_read_write): ditto.
(nogvl_copy_stream_func): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-03 18:34:06 +00:00
akr
a6d38b8c39
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31 11:09:27 +00:00
akr
f7676fd9d4
update rdoc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31 09:06:09 +00:00
akr
67d66b2652
* io.c (copy_stream_body): don't check to_io because
...
Zlib::GzipWriter#to_io returns the underlying IO.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31 07:19:24 +00:00
naruse
a928613a31
revert previous changes.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 02:56:23 +00:00
naruse
1ebed6c614
* file.c (rb_get_path): move encoding conversion of file path
...
from rb_scan_open_args.
* io.c (rb_scan_open_args): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 02:01:02 +00:00
akr
b729ec53a2
* io.c (fptr_finalize): don't allocate objects if noraise.
...
(finish_writeconv): add noalloc argument to be able to avoid
object allocation.
(finish_writeconv_arg): introduced again.
(finish_writeconv_sync): follow the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-26 09:05:47 +00:00
akr
b17c5eba46
* io.c (fptr_finalize): close the IO object even if finish_writeconv or
...
flush is failed.
(finish_writeconv): don't raise. return errno or exception.
(finish_writeconv_arg): removed.
(finish_writeconv_sync): follow finish_writeconv change.
* transcode.c (rb_econv_make_exception): new function.
* include/ruby/encoding.h (rb_econv_make_exception): declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-26 05:04:39 +00:00
akr
b0480260e2
* io.c (rb_io_s_pipe): unused variable removed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25 11:02:09 +00:00
akr
bb4329becd
* io.c (pipe_close): removed.
...
(pipe_yield): defined.
(rb_io_s_pipe): use pipe_yield.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25 09:36:40 +00:00
akr
ea6ac1c45b
* io.c (rb_io_initialize): check fd validity. [ruby-dev:36646]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25 08:07:01 +00:00
akr
db0a659012
* io.c (flush_before_seek): check io_fflush result.
...
(rb_io_check_readable): ditto.
(rb_io_flush): ditto.
(rb_io_fsync): ditto.
(remain_size): ditto.
(rb_io_write_nonblock): ditto.
(finish_writeconv): ditto.
(fptr_finalize): ditto.
(io_reopen): ditto.
(rb_io_reopen): ditto.
(copy_stream_body): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25 07:25:06 +00:00
matz
ad558a3a7f
* io.c (io_fflush): flush write buffer without write lock in
...
finalizers. [ruby-dev:37572]
* io.c (rb_io_fptr_finalize): clear write lock before finalizing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25 06:55:38 +00:00
akr
f20234994e
* io.c (fptr_finalize): close the IO object even if close(2) is failed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25 06:08:12 +00:00
usa
dea037cc67
* io.c: sorry, wrong commit. orz
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25 04:33:22 +00:00
usa
f29ec7ed67
* io.c (rb_io_flush): fsync() after buffer is flushed on win32.
...
[ruby-core:20043]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25 04:29:30 +00:00
akr
19fee2e2e0
* io.c (rb_io_init_copy): call io_seek only if io_tell succeeds.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23 15:22:18 +00:00