aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * configure.in: always check timezone().shugo2008-08-203-17/+23
| | | | | | | | | * strftime.c (rb_strftime): prefer timezone/altzone rather than gettimeofday(). The second argument to gettimeofday() is ignored on Solaris. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (open_key_args): simplified.akr2008-08-202-6/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (open_key_args): IO.foreach(path, rs, limit) didn't work.akr2008-08-203-3/+34
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_file_sysopen_internal): unused function removed.akr2008-08-202-13/+6
| | | | | | | (rb_file_sysopen): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c: use mode_t for the 3rd argument, permission, of open(2).akr2008-08-202-30/+34
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: removed strftime from AC_REPLACE_FUNCS().shugo2008-08-205-929/+22
| | | | | | | | | | * include/ruby/missing.h: removed prototype for strftime(). * missing/strftime.c: removed. * time.c (time_to_s): use rb_strftime() instead of strftime(3). (time_zone): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c: win32 support.usa2008-08-202-7/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2008-08-21svn2008-08-201-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c: new file.shugo2008-08-205-5/+954
| | | | | | | | | | * common.mk (COMMONOBJS): added strftime.$(OBJEXT). * time.c (time_strftime): do not use strftime(3). supported %L(millisecond) and %N(nanosecond). * test/ruby/test_time.rb: added tests for %L and %N. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_set_encoding): removed.akr2008-08-202-22/+18
| | | | | | | | | (rb_io_open): set up encoding using new argument opt. (open_key_args): call rb_io_open with opt. don't call io_set_encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_file_open_internal): use rb_io_flags_modenum.akr2008-08-202-7/+14
| | | | | | | | (rb_io_reopen): use rb_io_flags_modenum and rb_io_modenum_mode. (rb_io_stdio_file): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (proc_new): use the given class.nobu2008-08-205-15/+24
| | | | | | | * vm.c (vm_make_proc): added an argument for the class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_take): get rid of extraneous iteration.nobu2008-08-202-2/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_open_with_args): use rb_open_file instead of rb_io_open.akr2008-08-203-12/+26
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_scan_open_args): extracted from rb_open_file.akr2008-08-202-4/+24
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (convconfig_t): new type.akr2008-08-202-42/+106
| | | | | | | | | | | | | (rb_io_extract_modeenc): new function. (rb_file_open_generic): new function. (rb_file_open_internal): use rb_file_open_generic. (rb_file_sysopen_internal): use rb_file_open_generic. (rb_open_file): use rb_io_extract_modeenc and rb_file_open_generic. (rb_io_open): call rb_file_open_internal instead of rb_file_open. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (Init_IO): new constants: File::DSYNC, File::RSYNC andakr2008-08-202-0/+14
| | | | | | | File::NOFOLLOW. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_open_file): don't lookup :mode and :perm in opt. it isakr2008-08-202-5/+6
| | | | | | | | useless because vmode and perm is overwritten by rb_scan_args anyway. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (open_key_args): meaningless MEMCPY removed.akr2008-08-202-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (prep_io) [cygwin]: use FMODE_BINMODE instead of O_BINARY.akr2008-08-202-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_sample): performance improvement for huge array.nobu2008-08-202-18/+58
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_sample): get rid of infinite loop. #455nobu2008-08-202-1/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/io.h (FMODE_TRUNC): value changed because 0x100 is usedakr2008-08-192-1/+8
| | | | | | | as FMODE_NOREVLOOKUP in socket.c git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mkcdtmpdir doesn't yield a value.akr2008-08-191-9/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (parse_mode_enc): extracted from mode_enc.akr2008-08-192-47/+73
| | | | | | | (io_extract_encoding_option): extracted from io_set_encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_flags_modenum): make it static.akr2008-08-192-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/io.h (FMODE_TRUNC): new constant.akr2008-08-193-32/+46
| | | | | | | | | | | | * io.c (rb_io_mode_flags): set FMODE_TRUNC for "w". (rb_io_modenum_flags): set FMODE_TRUNC for O_TRUNC. (rb_io_flags_modenum): new function. (rb_io_mode_modenum): just use rb_io_mode_flags and rb_io_flags_modenum. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (fopen): macro for vms removed. fopen is not used now.akr2008-08-192-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2008-08-20svn2008-08-191-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (rb_econv_open): fix memory leak.akr2008-08-192-4/+17
| | | | | | | | (rb_econv_close): ditto. fixed by shinichiro.h. [ruby-dev:35880] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/io.h (rb_fopen): declaration removed.akr2008-08-193-26/+6
| | | | | | | | * io.c (rb_fopen): unused function removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/io.h (FMODE_READWRITE): define asakr2008-08-192-2/+6
| | | | | | | FMODE_READABLE|FMODE_WRITABLE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_flags_mode): use hexadecimal in error message.akr2008-08-192-3/+9
| | | | | | | | (rb_io_modenum_mode): ditto. (rb_io_initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_flags_mode): add a prefix 0 to octal in error message.akr2008-08-192-2/+7
| | | | | | | (rb_io_modenum_mode): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/io.h (FMODE_*): sorted and describe the values inakr2008-08-192-11/+17
| | | | | | | hexadecimal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_x509name.c (ossl_x509name_initialize): store theakr2008-08-192-0/+6
| | | | | | | result of d2i_X509_NAME into DATA_PTR(self). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rake.rb (FileUtils#ruby): takes care of space containing path.nobu2008-08-182-1/+6
| | | | | | | [ ruby-Bugs-21591 ] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_open_file): encoding in mode string was ignored if perm isakr2008-08-183-0/+20
| | | | | | | specified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix preivous change.akr2008-08-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_open_file): don't access argv[-1] by akr2008-08-182-8/+15
| | | | | | | File.allocate.instance_eval { initialize }. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_inspect): don't raise for uninitialized Regexp.akr2008-08-183-2/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2008-08-19svn2008-08-181-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_check_readable): side effect for STDIN removed.akr2008-08-183-6/+24
| | | | | | | (rb_io_external_encoding): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_ungetbyte): renamed from io_ungetc.akr2008-08-183-15/+88
| | | | | | | | (rb_io_ungetbyte): new method. (rb_io_ungetc): push back into character buffer if enc2 is set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (id_encode): removed.akr2008-08-182-2/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (make_writeconv): if enc and enc2 is set, convertakr2008-08-183-24/+25
| | | | | | | | | | string.encoding to enc2. * include/ruby/io.h: comment changed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/io.h (rb_io_t): new fields: writeconv,akr2008-08-187-17/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | writeconv_stateless and writeconv_initialized. (MakeOpenFile): initialize them. * include/ruby/encoding.h (rb_econv_stateless_encoding): declared. (rb_econv_string): declared. * io.c (make_writeconv): new function. (io_fwrite): use econv. (make_readconv): fix error message. (finish_writeconv): new function. (fptr_finalize): call finish_writeconv. (clear_writeconv): new function. (clear_codeconv): new function to call both clear_readconv and clear_writeconv. (rb_io_fptr_finalize): call clear_codeconv instead of clear_readconv. (mode_enc): ditto. (io_set_encoding): ditto. (argf_next_argv): ditto. (io_encoding_set): ditto. * gc.c (gc_mark_children): mark writeconv_stateless in T_FILE. * transcode.c (stateless_encoding_i): new function. (rb_econv_stateless_encoding): ditto. (rb_econv_string): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (clear_readconv): extracted from rb_io_fptr_finalize.akr2008-08-183-8/+77
| | | | | | | | | | (mode_enc): call clear_readconv. (io_set_encoding): ditto. (argf_next_argv): ditto. (io_encoding_set): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update comment.akr2008-08-181-2/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (mode_enc): modify enc and enc2 consistently.akr2008-08-182-1/+14
| | | | | | | | (io_set_encoding): ditto. (io_encoding_set): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e