akr
b314ab3e44
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-10 17:18:31 +00:00
akr
4433defb46
* io.c (io_binwrite): arg.offset should be updated after retry.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 22:59:25 +00:00
usa
a9a4435e12
* win32/win32.c (rb_w32_read): ERROR_BROKEN_PIPE is not a real error
...
at this point.
* io.c (pipe_open): use rb_w32_spawn() instead of rb_w32_pipe_exec()
to use our own redirection scheme.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 16:39:03 +00:00
akr
49b10fd508
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 15:21:32 +00:00
akr
ec324872d5
update rdoc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 15:02:49 +00:00
nobu
aa39c4491a
* io.c (rb_io_getc, rb_io_readchar): documentation correction from
...
Emiel van de Laar. [ruby-core:20212]
* ext/stringio/stringio.c (strio_ungetbyte): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 03:22:12 +00:00
nobu
551dfe9d8b
* include/ruby/io.h (rb_io_t): added write_lock to serialize.
...
[ruby-core:19668]
* gc.c (gc_mark_children): mark write_lock.
* gc.c (rb_gc_call_finalizer_at_exit): Mutex also needs to be
deferred.
* io.c (io_fflush, io_binwrite, fptr_finalize): serializes writing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-07 20:47:02 +00:00
matz
86ade65104
* io.c (rb_io_rewind): should reset fptr->readconv if it's
...
available.
* io.c (more_char): clear readconv at EOF.
* test/ruby/test_file.rb: should not read after EOF. use rewind
instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29 16:40:05 +00:00
usa
f3ac3e8774
* io.c (extract_binmode): new function to extract binmode/textmode
...
options from hash.
* io.c (rb_io_extract_modeenc): use above function.
* io.c (rb_io_s_pipe): recognize binmode/textmode options.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-28 12:00:42 +00:00
usa
7d934c47d1
* io.c (make_readconv): now can specify the size of cbuf.
...
* io.c (read_all, appendline, io_getc, rb_io_ungetc): follow above
change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-28 11:18:28 +00:00
nobu
782f3bd3f9
* io.c (argf_init): initial value of $. should be 0.
...
see [ruby-dev:36937].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27 06:55:06 +00:00
usa
db8e3024e7
* io.c (read_all): the 3rd argument maybe Qnil.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27 01:03:22 +00:00
nobu
0db5641dae
* io.c (read_all): use the given buffer to read when needs readconv.
...
based on the patch by wanabe <s.wanabe AT gmail.com> at
[ruby-dev:36931].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26 04:30:45 +00:00
matz
a9a23756b5
* io.c (pipe_open): remove unnecessary flush before fork.
...
a patch from Kazuhiro NISHIYAMA <zn at mbf.nifty.com>
in [ruby-dev:36840].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22 08:27:48 +00:00
matz
c5377c2bcc
* io.c (open_key_args): should adjust argc, argv in struct
...
foreach_arg.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 13:57:16 +00:00
matz
b6ef272d02
* ext/zlib/zlib.c: remove obsolete prototype macros.
...
* ext/zlib/zlib.c (struct gzfile): add encoding field to gzfile
structure.
* ext/zlib/zlib.c (rb_gzreader_getc): now works on characters.
* ext/zlib/zlib.c (rb_gzreader_getbyte): new method to retrieve
single byte.
* ext/zlib/zlib.c (rb_gzreader_readbyte): ditto.
* ext/zlib/zlib.c (rb_gzreader_each_byte): renamed from each_char
* ext/zlib/zlib.c (rb_gzreader_ungetc): allow unget strings.
* ext/zlib/zlib.c (rb_gzreader_ungetbyte): renamed from ungetc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 09:18:34 +00:00
shugo
d423b884b8
* io.c, include/ruby/intern.h (rb_io_ascii8bit_binmode): externed.
...
* ext/socket/socket.c (init_sock): use rb_io_ascii8bit_binmode()
instead of rb_io_binmode().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 04:31:15 +00:00
nobu
4442095d4c
* io.c (rb_file_open_internal): should initialize fmode before using.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 01:40:41 +00:00
matz
e50a5bcef0
* io.c (rb_io_extract_modeenc): plain rb/wb should set ASCII-8BIT
...
to the external_encoding.
* io.c (rb_file_open_internal): ditto.
* io.c (NEED_WRITECONV): no conversion when the external_encoding
is ASCII-8BIT.
* io.c (do_writeconv): skip ASCII-8BIT.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 16:57:19 +00:00
akr
7d48eab260
* io.c (rb_io_ascii8bit_binmode): renamed from rb_io_binmode.
...
(rb_io_binmode): don't change encoding conversion.
(rb_io_binmode_m): call rb_io_ascii8bit_binmode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 15:53:14 +00:00
akr
de55ffd024
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 05:07:38 +00:00
akr
0cda4bb3bf
* io.c (rb_io_binmode): reset encoding conversion.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 15:25:25 +00:00
mame
ca9589aeb0
* io.c (rb_getc, rb_io_fread, rb_io_fwrite, rb_read_pending):
...
remove deprecated functions which do not work. [ruby-dev:36697]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 15:18:17 +00:00
akr
5c9dd204f5
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-15 09:15:46 +00:00
nobu
1288965f4e
* io.c (Init_IO): $FILENAME and $* must be read-only. [ruby-dev:36698]
...
* variable.c (*_getter, *_setter, *_marker): made public.
* include/ruby/ruby.h (rb_gvar_*_{getter,setter,marker}): declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 11:45:32 +00:00
akr
43f910a9aa
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-11 13:44:31 +00:00
akr
470a309c4a
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-08 10:06:16 +00:00
matz
baeeebf474
* encoding.c (rb_default_internal_encoding): merged a patch from
...
Michael Selig <michael.selig at fs.com.au> in [ruby-core:18985].
* io.c (rb_io_ext_int_to_encs): ditto.
* ruby.c (proc_options): support default internal encoding in -E
option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-07 17:39:44 +00:00
yugui
e8ee99ff1a
* dln.c: Ruby no longer supports VMS.
...
* error.c: ditto.
* eval.c: ditto.
* eval_intern.h: ditto.
* include/ruby/defines.h: ditto.
* include/ruby/ruby.h: ditto.
* io.c: ditto.
* process.c: ditto.
* ruby.c: ditto.
* vms/config.h: removed.
* vms/vms.h: ditto.
* vms/vmsruby_private.c: ditto.
* vms/vmsruby_private.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:57:06 +00:00
yugui
ae7ea3332b
* dln.c: Ruby no longer supports MS-DOS.
...
* ext/sdbm/_sdbm.c: ditto.
* ext/sdbm/sdbm.h: ditto.
* gc.c: ditto.
* hash.c: ditto.
* include/ruby/defines.h: ditto.
* include/ruby/util.h: ditto.
* io.c: ditto.
* process.c: ditto.
* ruby.c: ditto.
* strftime.c: ditto.
* util.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:33:22 +00:00
yugui
8dd118c0db
* djgpp/GNUmakefile.in: removed. Ruby no longer supports djgpp.
...
* djgpp/README.djgpp: ditto.
* djgpp/config.hin: ditto.
* djgpp/config.sed: ditto.
* djgpp/configure.bat: ditto.
* djgpp/mkver.sed: ditto.
* ext/Setup.dj: ditto.
* dln.c: removed djgpp supports.
* file.c: ditto.
* gc.c: ditto.
* io.c: ditto.
* process.c: ditto.
* ruby.c: ditto.
* signal.c: ditto.
* util.c: ditto.
* vm_core.h: ditto.
* lib/fileutils.rb: ditto.
* lib/mkmf.rb: ditto.
* ext/socket/socket.c: ditto.
* test/fileutils/test_fileutils.rb: ditto.
* test/ruby/test_env.rb: ditto.
* test/ruby/test_path.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:25:12 +00:00
yugui
bbbd9c0b7b
* x68/_dtos18.c: removed. Ruby no longer supports human68k.
...
* x68/_round.c: ditto.
* x68/fconvert.c: ditto.
* x68/select.c: ditto.
* ext/Setup.x68: ditto.
* missing/x68.c: ditto.
* dln.c (dln_find_exe_r): removed human68k supports.
(dln_find_1): ditto.
* lib/mkmf.rb: ditto.
* ext/extmk.rb (Init_ext): ditto.
* ext/socket/socket.c (init_sock): ditto.
* gc.c (GC_MALLOC_LIMIT): ditto.
(rb_setjmp, rb_jmpbuf): ditto.
(mark_current_machine_context): ditto.
* include/ruby/defines.h (PATH_ENV): ditto.
* io.c: ditto.
* process.c: ditto.
* ruby.c: ditto.
* test/ruby/test_env.rb: ditto.
* test/ruby/test_path.rb: ditto.
* LEGAL
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:12:13 +00:00
matz
414605560f
* io.c (rb_io_extract_modeenc): should honor value of the
...
textmode: and binmode: options.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30 17:55:25 +00:00
akr
a3bebd5564
* include/ruby/encoding.h (rb_str_encode): renamed from
...
rb_str_transcode. [ruby-dev:36593]
(rb_econv_has_convpath_p): renamed from rb_transcode_convertible.
* transcode.c: follow the renaming.
* io.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-26 10:35:00 +00:00
akr
48fdf59dcf
* io.c (rb_io_mode_enc): make it static.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 17:10:03 +00:00
matz
9bf27f6b17
* io.c (rb_io_s_binread): offset argument was wrongly passed to
...
internal IO#read call. [ruby-core:18810]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 02:31:12 +00:00
akr
c1759a9f18
* io.c (io_binwrite): allocate wbuf if nosync.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 12:51:39 +00:00
akr
0f1a1073f7
* io.c (copy_stream_body): use io_binwrite instead of io_fwrite.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 12:46:17 +00:00
akr
55783c696d
* io.c (io_binwrite): add nosync argument.
...
(do_writeconv): extracted from io_fwrite.
(io_fwrite): add nosync argument. use do_writeconv.
(io_write): add nosync argument.
(io_write_m): new function for IO#write.
(rb_p): don't append record separator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 11:55:48 +00:00
matz
6b90013d1e
* io.c (rb_io_s_binread): a new method to read binary chunk from a
...
file. [ruby-core:18674]
* io.c (open_key_args): wrong permission specified for read-open.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 10:48:17 +00:00
ko1
b9a12116fb
* thread.c, include/ruby/intern.h (rb_thread_interrupted): added.
...
* io.c: use VALUE of thead instead of rb_tread_t to check interrupts.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 08:17:17 +00:00
matz
b09322c61a
* io.c (rb_io_extract_modeenc): process option mode: and perm: as
...
well.
* io.c (open_key_args): move mode: and perm: related code to
rb_io_extract_modeenc().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-17 16:39:47 +00:00
matz
73c8f02384
* io.c (rb_io_readbyte): rdoc updated. [ruby-core:18617]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16 09:36:06 +00:00
matz
428661eccf
* io.c (rb_io_gets_m): rdoc updated. limit counts in bytes.
...
[ruby-core:18617]
* io.c (rb_io_readlines, rb_f_gets): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16 09:29:40 +00:00
ko1
69029b90fe
* gc.c, include/ruby/ruby.h: rename rb_register_mark_object()
...
to rb_gc_register_mark_object().
* eval.c, vm.c: initialize vm->mark_object_ary at
Init_top_self().
* bignum.c, complex.c, encoding.c, ext/win32ole/win32ole.c,
io.c, load.c, marshal.c, rational.c, ruby.c, vm.c:
use rb_gc_register_mark_object() instead of
rb_global_variable() or rb_gc_register_address().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15 14:59:14 +00:00
akr
a517395056
* encoding.c (rb_enc_get_index): don't return -1.
...
* io.c (rb_scan_open_args): call FilePathValue before encoding
conversion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15 14:29:09 +00:00
akr
19416601a0
* include/ruby/oniguruma.h (OnigEncodingTypeST): add end argument for
...
left_adjust_char_head.
(ONIGENC_LEFT_ADJUST_CHAR_HEAD): add end argument.
(onigenc_get_left_adjust_char_head): ditto.
* include/ruby/encoding.h (rb_enc_left_char_head): add end argument.
* regenc.h (onigenc_single_byte_left_adjust_char_head): ditto.
* regenc.c (onigenc_get_right_adjust_char_head): follow the interface
change.
(onigenc_get_right_adjust_char_head_with_prev): ditto.
(onigenc_get_prev_char_head): ditto.
(onigenc_step_back): ditto.
(onigenc_get_left_adjust_char_head): ditto.
(onigenc_single_byte_code_to_mbc): ditto.
* re.c: ditto.
* string.c: ditto.
* io.c: ditto.
* regexec.c: ditto.
* enc/euc_jp.c: ditto.
* enc/cp949.c: ditto.
* enc/shift_jis.c: ditto.
* enc/gbk.c: ditto.
* enc/big5.c: ditto.
* enc/euc_tw.c: ditto.
* enc/euc_kr.c: ditto.
* enc/emacs_mule.c: ditto.
* enc/gb18030.c: ditto.
* enc/utf_8.c: ditto.
* enc/utf_16le.c: ditto.
* enc/utf_16be.c: ditto.
* enc/utf_32le.c: ditto.
* enc/utf_32be.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-13 19:23:52 +00:00
akr
4dcf54aea1
* io.c (io_encoding_set): don't need argc argument.
...
(rb_io_s_pipe): update io_encoding_set call.
(rb_io_set_encoding): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-13 10:28:06 +00:00
akr
8d7e774f5f
* io.c (make_writeconv): use rb_enc_name.
...
(make_readconv): ditto.
* transcode.c (rb_econv_open_opts): ditto.
(econv_args): ditto.
(decorate_convpath): ditto.
(econv_set_replacement): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-13 09:06:51 +00:00
akr
965ff82341
* iseq.c (iseq_s_compile_file): use rb_file_open_str.
...
* io.c (rb_file_open_generic): call validate_enc_binmode.
(rb_file_open_str): call FilePathValue.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-12 18:32:19 +00:00