summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
2010-03-21* io.c (rb_io_initialize): add autoclose argument to control closenobu
at finalization. [ruby-core:26222] * io.c (rb_io_autoclose_p, rb_io_set_autoclose): new methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-21* io.c (IO_RBUF_CAPA_FOR): use large buffer as cbuf if readconv isnobu
needed for performance improvement. based on a patch by Roger Pack in [ruby-core:28163]. [ruby-core:28162] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-21* io.c (IO_[CRW]BUF_CAPA_MIN): replaced magic numbers.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-15* io.c (rb_io_print): RDoc update. a patch from Daniel Kelleymatz
in [ruby-core:28643]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-14* io.c (rb_io_each_codepoint): read directly when readconv isnobu
needed but internal encoding is not set. [ruby-core:28650] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-13* io.c (rb_io_print): should not print field separator at the endmatz
of arguments. [ruby-talk:358633] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-07* io.c: Fix documentation for each/each_line/lines, bytes/each_byte,marcandre
codepoints/each_code_point [ruby-core:23948] * string.c: ditto * ext/stringio/stringio.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-06* io.c (rb_io_s_write, rb_io_s_binwrite): delete File#write andmame
#binwrite. It may take a long time to make them stable, so 1.9.2 should not include them. We need refactoring to implement them again. * test/ruby/test_io.rb: delete tests for them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-06* io.c (rb_io_s_binwrite): use mode "r+b" instead of "ab" to handlemame
offset correctly. [ruby-core:28517] * test/ruby/test_io.rb: use assert_equal instead of assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-05* io.c (pipe_open): suppressed a warning.nobu
* win32/win32.c (rb_w32_map_errno, winnt_stat, rb_chsize): ditto. * win32/win32.c (rb_w32_aspawn): get rid of overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-04* io.c (io_s_write, io_s_binwrite): add File#write and #binwrite.mame
[ruby-core:21701] * test/ruby/test_io.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-02* io.c (rb_io_lines, rb_io_bytes, rb_io_chars, rb_io_codepoints):mame
change to alias to each_*, in similar way to ARGF and String. [ruby-core:23948] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-19rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-17* io.c (io_fread, io_getpartial, io_read, io_sysread): by using lock,mame
prohibit modification of buffer string during read (which had caused EFAULT or SEGV). [ruby-dev:40437] * test/ruby/test_io.rb: rewrite tests for the old behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-15* io.c: check lseek error by errno. NetBSD 4.0.1 may return -1 asakr
a file position of tty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-11* io.c (rb_io_oflags_modestr): return "r" for O_RDONLY|O_APPEND.akr
[ruby-dev:40379] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-09* io.c (READ_CHECK): do not select fd before reading, that had mademame
TCPServer#gets stuck. [ruby-dev:40317] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-08* io.c (rb_io_getline_fast): wrong calculation of new positionmatz
from rb_str_coderange_scan_restartable(). [ruby-core:28103] * io.c (read_all): ditto. * sprintf.c (rb_str_format): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-31* io.c (rb_io_each_codepoint): use cbuf when needs readconv.wanabe
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25* dln.c, file.c, io.c, signal.c: add __HAIKU__.naruse
patched by Alexander von Gluck [ruby-core:27767] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-08* io.c (rb_io_s_read): close the IO if an exception is raised onusa
seeking. [ruby-core:27429] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-20* vm_eval.c (rb_iterate): pass current block when the argument bl_procmame
is NULL. This behavior can be used to make enumerator faster [ruby-dev:39874] * enumerator.c (enumerator_each): pass current block directly instead of trampoline block (enumerator_each_i). * io.c (argf_each_line, argf_each_byte, argf_each_char): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-26* removed spaces just before tabs.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-21* io.c (read_all): fix: false negative invalid byte seequencenaruse
on reading from pipes. [ruby-dev:39743] fix: assigin the variable 'pos' as relative value from recent pos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-18* io.c (MORE_CHAR_SUSPENDED): renamed from MORE_CHAR_CBUF_FULL.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-18* io.c (fill_cbuf): extracted from more_char.akr
(io_shift_cbuf): fix memmove condition. (read_all): use fill_cbuf directly to avoid ECONV_AFTER_OUTPUT. [ruby-dev:39708] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-18* io.c (rb_scan_open_args): move path encoding conversionnaruse
for filesystem encoding of Mac OS X. * file.c (file_path_convert): added for convert encoding of file path. * file.c (rb_get_path_check): add file_path_convert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-17* io.c (parse_mode_enc): fix invalid access.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-16* io.c (read_all): shift read buffer if exception occured.wanabe
pointed out in [ruby-dev:39702]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-15* io.c (read_all): don't call io_shift_cbuf until bufffering enough orwanabe
econv_finished. [ruby-dev:39696] * io.c (more_char): don't call clear_readconv to read buffer after econv_finished. * io.c (appendline, rb_io_each_codepoint): clear readconv when done. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-03fix typos.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-29* array.c (rb_ary_to_ary): do not use #respond_to? to detectmatz
to_ary. Just call. [ruby-core:23738] * eval.c (rb_check_funcall): new function with method existence check. returns Qundef when the method does not exist. * enumerator.c (enumerator_rewind): just call method, using rb_check_funcall(). [ruby-core:23738] * error.c (exc_equal): ditto. * object.c (convert_type): ditto. * error.c (rb_name_err_mesg_new): export function. * eval.c (make_exception): ditto. * io.c (pop_last_hash): return early when the last argument is nil. * io.c (rb_io_puts): treat T_STRING specially for small optimization. * vm_eval.c (raise_method_missing): skip method call if possible using rb_method_basic_definition_p(). * vm_eval.c (method_missing): ditto. * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_debug): test suites changed to ignore exceptions caused by just-call policy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28* io.c (Init_IO): rb_default_rs should be US-ASCII.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-25* io.c (io_cntl): F_DUPFD is platform dependent.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-23* io.c (io_cntl): update max file descriptor by the result ofakr
fcntl(F_DUPFD). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-15* io.c (io_encoding_set): get rid of parsing non-ascii string, andnobu
refine messages for invalid name encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-15* io.c (io_reopen): unread current buffer before telling thenobu
position, for the case of reopening same file. [ruby-dev:39479] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-11rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-06* io.c (io_reopen): avoid close if possible.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-05rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29* io.c (rb_scan_open_args): rb_utf8mac_encoding is undefined.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29* io.c (rb_scan_open_args): add UTF8-MAC to no-convertion encoding.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-08* include/ruby/st.h (st_hash_func): use st_index_t.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-07* io.c (rb_io_tell): adjustment for ungotten data.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-07* io.c (io_encname_bom_p): removed magic number.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-07* io.c (Init_IO): added rdocs for constants.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-06* io.c: fixed rdoc, a patch from Nobuhiro IMAI at [ruby-core:25433].nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-05* io.c (argf_next_argv): fixed indent.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-05* io.c: Add rdoc for ARGF.naruse
contributed by Run Paint Run Run. [ruby-core:23854] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-21Rename FMODE_STRIP_BOM to FMODE_SETENC_BY_BOM.naruse
* include/ruby/io.h, io.c (FMODE_SETENC_BY_BOM): renamed from FMODE_STRIP_BOM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e