summaryrefslogtreecommitdiffstats
path: root/io.c
Commit message (Collapse)AuthorAgeFilesLines
* * vm_eval.c (rb_iterate): pass current block when the argument bl_procmame2009-12-201-3/+3
| | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@26128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * removed spaces just before tabs.nobu2009-11-261-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (read_all): fix: false negative invalid byte seequencenaruse2009-11-211-1/+1
| | | | | | | on reading from pipes. [ruby-dev:39743] fix: assigin the variable 'pos' as relative value from recent pos. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (MORE_CHAR_SUSPENDED): renamed from MORE_CHAR_CBUF_FULL.akr2009-11-181-5/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (fill_cbuf): extracted from more_char.akr2009-11-181-25/+41
| | | | | | | | | (io_shift_cbuf): fix memmove condition. (read_all): use fill_cbuf directly to avoid ECONV_AFTER_OUTPUT. [ruby-dev:39708] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_scan_open_args): move path encoding conversionnaruse2009-11-181-21/+0
| | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@25835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (parse_mode_enc): fix invalid access.akr2009-11-171-1/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (read_all): shift read buffer if exception occured.wanabe2009-11-161-1/+8
| | | | | | | pointed out in [ruby-dev:39702]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (read_all): don't call io_shift_cbuf until bufffering enough orwanabe2009-11-151-2/+7
| | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@25789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos.akr2009-11-031-6/+6
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_to_ary): do not use #respond_to? to detectmatz2009-10-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@25556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (Init_IO): rb_default_rs should be US-ASCII.naruse2009-10-281-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_cntl): F_DUPFD is platform dependent.nobu2009-10-251-0/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_cntl): update max file descriptor by the result ofakr2009-10-231-0/+3
| | | | | | | fcntl(F_DUPFD). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_encoding_set): get rid of parsing non-ascii string, andnobu2009-10-151-4/+3
| | | | | | | refine messages for invalid name encoding. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_reopen): unread current buffer before telling thenobu2009-10-151-7/+7
| | | | | | | position, for the case of reopening same file. [ruby-dev:39479] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-10-111-3/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_reopen): avoid close if possible.akr2009-10-061-8/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-10-051-4/+10
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_scan_open_args): rb_utf8mac_encoding is undefined.nobu2009-09-291-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_scan_open_args): add UTF8-MAC to no-convertion encoding.naruse2009-09-291-3/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/st.h (st_hash_func): use st_index_t.nobu2009-09-081-1/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_tell): adjustment for ungotten data.nobu2009-09-071-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_encname_bom_p): removed magic number.nobu2009-09-071-2/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (Init_IO): added rdocs for constants.nobu2009-09-071-8/+21
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c: fixed rdoc, a patch from Nobuhiro IMAI at [ruby-core:25433].nobu2009-09-061-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (argf_next_argv): fixed indent.nobu2009-09-051-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c: Add rdoc for ARGF.naruse2009-09-051-6/+643
| | | | | | contributed by Run Paint Run Run. [ruby-core:23854] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Rename FMODE_STRIP_BOM to FMODE_SETENC_BY_BOM.naruse2009-08-211-4/+4
| | | | | | | * include/ruby/io.h, io.c (FMODE_SETENC_BY_BOM): renamed from FMODE_STRIP_BOM. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Change modestr syntax for BOM to "BOM|UTF-*".naruse2009-08-211-13/+7
| | | | | | | | | * io .c (rb_io_fmode_modestr): change modestr syntax for BOM to "BOM|UTF-*". * io.c (parse_mode_enc): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_sysopen_internal): removed const qualifier.nobu2009-08-201-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_sysopen): moved sysopen_struct from rb_sysopen_internal.nobu2009-08-201-30/+44
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_stdio_set_default_encoding): prototyped.nobu2009-08-051-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Set encodings of stdio after setting default internal and external.naruse2009-07-311-0/+11
| | | | | | | | | * io.c (rb_stdio_set_default_encoding): added. * ruby.c (process_options): call rb_stdio_set_default_encoding after setting defualt internal and external. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (argf_eof): should call next_argv() before testing.matz2009-07-281-0/+1
| | | | | | [ruby-core:24561] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (argf_eof): go to the next file if called after ARGF.closenobu2009-07-261-0/+1
| | | | | | | or ARGF.skip. [ruby-core:24561] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (argf_eof): should not have reached EOF before trying tonobu2009-07-251-1/+1
| | | | | | | | read. based on a patch by Heesob Park <phasis AT gmail.com> at [ruby-core:24559]. [ruby-core:24557] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_f_open): add rdoc about specifying ext_enc as *-bom.naruse2009-07-201-0/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_read): should taint the result. [ruby-dev:38826]nobu2009-07-191-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * suppressed shorten-64-to-32 warnings.nobu2009-07-181-19/+19
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_reopen): discards read buffer. [ruby-core:24240]nobu2009-07-161-0/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (argf_free): free data body.ko12009-07-151-1/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_initialize): check if the descriptor can be accessednobu2009-07-141-5/+17
| | | | | | | in the specified open mode. [ruby-dev:38571] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): handles leaked on win32 when an error occurs.usa2009-07-131-3/+13
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-07-121-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (io_strip_bom): ungetbyte third byte when UTF-16LE.naruse2009-07-101-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix condition of second byte of UTF-16LE/UTF-32LE.naruse2009-07-101-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cosmetic changesnaruse2009-07-101-5/+8
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Set encoding and strip bom when modeenc string is "r:foo-bom" [ruby-dev:37236]naruse2009-07-091-2/+112
| | | | | | | | | | | | | | * include/ruby/io.h (FMODE_STRIP_BOM): new constant. * io.c (io_encname_bom_p): judge whether the encoding name is *-bom or not. (parse_mode_enc): drop "-bom". (rb_io_modestr_fmode): set FMODE_STRIP_BOM if needed. (rb_io_extract_modeenc): ditto. (io_strip_bom): strip bom if exists. (io_set_encoding_by_bom): set encoding if there is bom. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_ext_int_to_encs): Set external encoding ifnaruse2009-07-071-1/+1
| | | | | | ext==intern. [ruby-dev:38278] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e