summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
2008-01-17* io.c (Init_IO): stdin/stdout may not be duplex.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-17* io.c (io_fwrite): always flush IO on tty, even without newlines.matz
[ruby-core:15107] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-17* io.c (rb_io_check_readable): flush tied write IO too.nobu
* io.c (Init_IO): tie stdin with stdout. [ruby-core:15107] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-16* io.c (pipe_open, rb_io_s_popen): clear temporary object to releasenobu
and prevent from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-16* load.c (rb_feature_p): get rid of unlimited alloca.nobu
* object.c (rb_cstr_to_dbl): ditto. * io.c (mode_enc): fixed uninitialized variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-16* file.c (sys_fail2): get rid of unlimited alloca.nobu
* io.c (mode_enc, pipe_open, rb_io_s_popen): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-14* io.c (appendline): specifying limit should not generate brokenmatz
byte sequence. strings should be rounded. [ruby-dev:33088] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-10io.c (io_encoding_set): typo fixedmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-10* io.c (io_encoding_set): handle nil for v1.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-10* io.c (io_encoding_set): IO.pipe("euc-jp", nil) should work asmatz
IO.pipe("euc-jp", nil). [ruby-dev:33000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09* io.c (rb_io_binmode): should not alter encoding. [ruby-dev:32918]matz
* io.c (io_read_encoding): need not to return ASCII-8BIT for binary IO. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-05update rdoc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-03* io.c (io_ungetc): move data in buffer if it is required to store theakr
argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-03* io.c (fptr_finalize): clear errno first. [ruby-talk:284492]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-01* io.c (rb_io_mode_enc): encoding spec is not allowed in binary mode.nobu
[ruby-dev:32913] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-29comment modified.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-29* io.c (io_fflush): don't retry when wbuf modified by other threads.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28 * io.c (io_unread): fix typo.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28 * io.c (io_unread): adhoc workaround for non-binary mode of some DOSishusa
platforms. this is not perfect and safety, but works with most cases. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-27* io.c (io_fflush): checks wbuf modification by other threads.akr
not perfect. it need locks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-26* io.c (io_fflush): check closed fptr after rb_write_internal to avoidakr
SEGV on MacOS X. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* io.c (appendline): move RS comparison to rb_io_getline_1().matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* io.c (rb_io_external_encoding): should return nil formatz
pass-through write IO. [ruby-dev:32740] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* io.c (appendline): initialize rslen to 1 if rsptr is 0.akr
rslen should be the length of the delimiter. if only delim is given, it should be 1. [ruby-dev:32746] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* io.c (io_encoding_set): missing return type.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24* io.c (rb_io_s_pipe): now takes up to two arguments. allow itsmatz
external/internal encoding by Encoding objects. * io.c (rb_io_set_encoding): new method to set encoding of the IO. * io.c (argf_set_encoding): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24* include/ruby/encoding.h (rb_enc_left_char_head): new utility macro.matz
* include/ruby/encoding.h (rb_enc_right_char_head): ditto. * io.c (appendline): does multibyte RS search in the function. * io.c (prepare_getline_args): RS may be nil. * io.c (rb_io_getc): should process character based on external encoding, when transcoding required. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23* io.c (appendline): should do multibyte aware RS search.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23* io.c (io_enc_str): should preserve default_external encoding.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23* io.c (prepare_getline_args): convert RS to external encoding.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23* io.c (rb_io_check_readable): should not fill fptr->enc always.matz
read-write IO (e.g. socket) does not work. [ruby-dev:32685] * io.c (io_read_encoding): retrieve reading encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23* io.c (rb_io_external_encoding): should return the encoding ofmatz
the file reading. * io.c (rb_io_internal_encoding): should return the encoding of read string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23* io.c (rb_f_open): documentation update.matz
* io.c (rb_io_s_pipe): ditto. * io.c (io_fwrite): wrong encoding destination. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23* io.c (rb_io_s_pipe): allow specifying read-side encoding.matz
* io.c (io_enc_str): wrong encoding destination. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23* io.c (open_key_args): IO direct methods (foreach, readlines,matz
read) now takes keyword argument: encoding, mode, open_args. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23* io.c (rb_io_s_read): encoding argument reverted.matz
* io.c (mode_enc): independent function to share code. * io.c (rb_io_internal_encoding): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23* io.c (rb_io_binmode_m): removed C99ism.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* include/ruby/encoding.h, encoding.c, re.c, io.c, parse.y, numeric.c,akr
ruby.c, transcode.c: rename rb_ascii_encoding. to rb_ascii8bit_encoding. rb_ascii_encoding is ambiguous with ASCII-8BIT and US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* io.c (rb_io_mode_enc): do not set encoding unless explicitlymatz
specified. * io.c (rb_io_check_readable): fill fptr->enc by default_external if it's empty. * io.c (io_enc_str): fptr->enc is always set for reading IO (by rb_io_check_readable(fptr)). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* io.c, io.h: temporary patch to partially implement transcode-on-read and ↵davidflanagan
transcode-on-write git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21io.c: fix typo in rdoc commentdavidflanagan
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* encoding.c (rb_ascii_encoding): renamed from previousmatz
rb_default_encoding(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* io.c (io_ungetc): avoid buffer relocation, which might causematz
serious problem under concurrent situation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* io.c: write() should be in blocking region.ko1
* bootstraptest/test_io.rb, test_knownbug.rb: move a fixed test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* io.c (rb_io_s_read): allow specifying encoding explicitly.matz
* io.c (rb_io_binmode): specifies encoding to ASCII-8BIT (binary). * io.c (rb_io_s_read): IO should be in binary mode when offset is specified. * encoding.c (rb_to_encoding): returns default encoding if no corresponding encoding found. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* io.c (Init_IO): define IO::BINARY even if O_BINARY is not exist.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* io.c (rb_io_external_encoding): should fill delayedmatz
initialization for STDIN. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* io.c (rb_io_external_encoding): new method.matz
* encoding.c (rb_enc_from_encoding): returns Qnil for NULL encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* io.c (rb_io_mode_enc): set default external encoding if nomatz
encoding specified explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e