summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
2010-05-17* array.c: Documentation: change => in call-seq to ->.marcandre
Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-13* io.c (swallow): should use more_char() instead of fill_cbuf().usa
suggested by akr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-13* array.c: Harmonize documentation, in particular regarding:marcandre
- methods returning enumerators - array methods and argument naming (array -> ary, an_array -> new_ary) - minor improvements, typo fixed and styling issues Other documentation errors fixed: - return value was self instead of a new array (or vice-versa) for Array#{pop,shift,permutation,repeated_permutation,keep_if} - Array#rindex was missing the form with a block. * dir.c: ditto. * enum.c: ditto. Modified Enumerable#reverse_each' documentation to clarify that #each will be finish before any element is yielded. * error.c: ditto. * gc.c: ditto. * hash.c: ditto. * io.c: ditto. IO#{codepoints,each_codepoint} fixed as per [ruby-core:23948] * numeric.c: ditto. * range.c: ditto. * string.c: ditto. * struct.c: ditto. * vm_eval.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-13* io.c (swallow): small optimize.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-13* io.c (swallow): support text mode and UTF-16/32 as internal encoding.usa
* io.c (io_shift_cbuf): read and throw it away when str is NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-10* win32/win32.c, include/ruby/win32.h (rb_w32_has_cancel_io): newusa
function. * io.c (WAIT_FD_IN_WIN32): check only when it's not cancelable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-08* io.c (nogvl_copy_stream_sendfile): ISO C90 forbids mixed declarations and ↵kazu
code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-08* error.c: RDoc for subclasses of Exception. [ruby-core:28394]marcandre
* cont.c: ditto * enumerator.c: ditto * io.c: ditto * math.c: ditto * numeric.c: ditto * proc.c: ditto * re.c: ditto * thread.c: ditto * transcode.c: ditto. Thanks to Run Paint for some of the documentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-03Add rdoc about IO#read(length). [ruby-core:29161]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30* merge some patches from win32-uncode-test branch.usa
see #1685. * file.c, include/ruby/intern.h (rb_str_encode_ospath): new function to convert encoding for pathname. * win32.c, include/ruby/win32.h (rb_w32_ulink, rb_w32_urename, rb_w32_ustati64, rb_w32_uopen, rb_w32_uutime, rb_w32_uchdir, rb_w32_umkdir, rb_w32_urmdir, rb_w32_uunlink): new functions to accept UTF-8 path. * win32/win32.c (rb_w32_opendir, link, rb_w32_stati64, rb_w32_utime, rb_w32_unlink): use WCHAR path internally. * file.c (rb_stat, eaccess, access_internal, rb_file_s_ftype, chmod_internal, rb_file_chmod, rb_file_chown, utime_internal, rb_file_s_link, unlink_internal, rb_file_s_rename): use UTF-8 version functions on Win32. * file.c (apply2files, rb_stat, rb_file_s_lstat, rb_file_symlink_p, rb_file_readable_p, rb_file_writable_p, rb_file_executable_p, check3rdbyte, rb_file_identical_p, rb_file_chmod, rb_file_chown, rb_file_s_link, rb_file_s_symlink, rb_file_s_rename): call rb_str_encode_ospath() before passing the path to system. * io.c (rb_sysopen): ditto. * dir.c (dir_chdir, dir_s_mkdir, dir_s_rmdir): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30* io.c (seek_before_access): fixed argument type.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-29* io.c (seek_before_access): renamed. see [ruby-core:29861].nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-29* io.c (rb_io_s_binread): fixed rdoc. parts of a patch from Rogernobu
Pack in [ruby-core:29861]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-26* io.c (select_internal): IO which cbuf is not empty is readable.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-25* io.c (ruby_dup): update max fd.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-24update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-24update document.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-24* io.c: raise IOError when byte oriented operations occur withakr
non-empty character buffer. [ruby-dev:40493] [ruby-dev:40506] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-21* io.c (io_getc): fix incomplete character immediately before EOFnaruse
with newline converter. [ruby-dev:41024] run test only when "Create Shortcut (&S)" menu is found. * lib/rexml/parsers/xpathparser.rb (PathExpr): ditto. * lib/matrix.rb (Vector#each): make Vector enumerable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-20* io.c (io_getc): set read_encoding to resulted one characternaruse
string. [ruby-dev:41023] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-20* io.c: fixed the wrong description of rdoc.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-20* io.c: rdoc. see [ruby-dev:40506].usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-19* io.c (internal_{read,write}_func, rb_{read,write}_internal):nobu
reverted r27265, since now rb_thread_blocking_region() preserves errno. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-16* io.c (rb_io_rewind, rb_io_eof): add rdoc. based on a patch frommame
Roger Pack in [ruby-core:26771] [Bug #2377]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-14* io.c (io_shift_cbuf): should terminate.nobu
http://golf.shinh.org/p.rb?DECimal+number+to+BINary#Ruby git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-11* io.c (rb_io_getline_fast, rb_io_getline_1): fix ARGF.lineno behavior. ↵kazu
[ruby-core:25205] * test/ruby/test_argf.rb (TestArgf#test_lineno3): add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-08* io.c (internal_{read,write}_func, rb_{read,write}_internal):nobu
preserve errno. a patch from Takehiro Kubo in [ruby-core:29340]. [ruby-core:28924] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-01* io.c (rb_io_initialize): fixed a rdoc miss that textmode andnobu
bimode flag explanation was reversed each other. a patch from Heesob Park in [ruby-core:29166]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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