aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * include/ruby/encoding.h (ECONV_INVALID_MASK): defined.akr2008-08-234-53/+119
| | | | | | | | | | | | | | | | | | | | | (ECONV_INVALID_IGNORE): defined. (ECONV_INVALID_REPLACE): defined. (ECONV_UNDEF_MASK): defined. (ECONV_UNDEF_IGNORE): defined. (ECONV_UNDEF_REPLACE): defined. * transcode.c (INVALID_IGNORE): removed. (INVALID_REPLACE): removed. (UNDEF_IGNORE): removed. (UNDEF_REPLACE): removed. (rb_econv_convert0): renamed from rb_econv_convert. (rb_econv_convert): defined to call rb_econv_convert0 with replace/ignore behavior moved from transcode_loop. (transcode_loop): replace/ignore behavior removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_extract_modeenc): check :textmode and :binmode in optionakr2008-08-233-0/+33
| | | | | | | hash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pty/pty.c (pty_getpty): follow rb_io_t's path -> pathv change.akr2008-08-232-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (check_pipe_command): extracted from rb_f_open and rb_io_open.akr2008-08-232-7/+27
| | | | | | | | (rb_f_open): use check_pipe_command. (rb_io_open): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (read_all): fptr->enc2 is 0 if no conversion.akr2008-08-232-9/+11
| | | | | | | | (rb_io_getline_fast): ditto. (io_getc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/io.h (rb_io_t): remove path field and add pathv field.akr2008-08-236-92/+102
| | | | | | | | | | | | | | | | (MakeOpenFile): initialize pathv as Qnil. * gc.c: mark pathv field in T_FILE. * io.c: follow the rb_io_t field change. * file.c: ditto. * ext/socket/socket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2008-08-23svn2008-08-221-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/io.h (FMODE_TEXTMODE): defined.akr2008-08-228-80/+420
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/ruby/encoding.h (rb_econv_t): new field: flags. (rb_econv_binmode): declared. * io.c (io_unread): text mode hack removed. (NEED_NEWLINE_DECODER): defined. (NEED_NEWLINE_ENCODER): defined. (NEED_READCONV): defined. (NEED_WRITECONV): defined. (TEXTMODE_NEWLINE_ENCODER): defined for windows. (make_writeconv): setup converter with TEXTMODE_NEWLINE_ENCODER for text mode. (io_fwrite): use NEED_WRITECONV. character code conversion is disabled if fptr->writeconv_stateless is nil. (make_readconv): setup converter with ECONV_UNIVERSAL_NEWLINE_DECODER for text mode. (read_all): use NEED_READCONV. (appendline): use NEED_READCONV. (rb_io_getline_1): use NEED_READCONV. (io_getc): use NEED_READCONV. (rb_io_ungetc): use NEED_READCONV. (rb_io_binmode): OS-level text mode test removed. call rb_econv_binmode. (rb_io_binmode_m): call rb_io_binmode_m with write_io as well. (rb_io_flags_mode): return mode string including "t". (rb_io_mode_flags): detect "t" for text mode. (rb_sysopen): always specify O_BINARY. * transcode.c (rb_econv_open_by_transcoder_entries): initialize flags. (rb_econv_open): if source and destination encoding is both empty string, open newline converter. last_tc will be NULL in this case. (rb_econv_encoding_to_insert_output): last_tc may be NULL now. (rb_econv_string): ditto. (output_replacement_character): ditto. (transcode_loop): ditto. (econv_init): ditto. (econv_inspect): ditto. (rb_econv_binmode): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* typotadf2008-08-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_div): now behaves as quo.tadf2008-08-228-307/+325
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * complex.c (nucomp_s_generic_p): has been removed. * complex.c (nucomp_to_s): adopts new form. * complex.c (nucomp_inspect): ditto. * complex.c (string_to_c_internal): ditto and supports polar form. * complex.c (rb_complex_polar): new. * rational.c (nurat_to_s): did not canonicalize. * rational.c (nurat_inspect): adopts new form. * rational.c (string_to_r_internal): ditto. * include/ruby/intern.h: added a declaration. * lib/complex.rb: added an obsolate class method. * lib/cmath.rb: use scalar? instead of generic?. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/server.rb (WEBrick::GenericServer#shutdown):kazu2008-08-224-8/+37
| | | | | | | | | | | | rescue Errno::ENOTCONN and close. [ruby-dev:35896] * test/openssl/test_ssl.rb (OpenSSL#start_server): ditto. [ruby-dev:35897] * lib/net/imap.rb (Net::IMAP#disconnect): ditto. [ruby-dev:35898] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/date.rb: no need to require the "lib/rational.rb" any more.tadf2008-08-222-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* reverttadf2008-08-221-10/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi.rb: use bytesize instead of size/length.usa2008-08-222-17/+21
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): supported flags and precision for mostnobu2008-08-224-145/+212
| | | | | | | | | | conversions. [ruby-dev:35906] * lib/date/format.rb (Date#strftime): left-justifies %L and %N. [ruby-dev:35909] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_transcode.rb: test_shift_jis:duerst2008-08-222-21/+26
| | | | | | | | fixed comment strings (see r18291) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_pid): use PIDT2NUM.akr2008-08-222-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (dir_enc_str_new): set US-ASCII to the pathnaruse2008-08-222-0/+12
| | | | | | | | | when the path is 7bit string and encoding is ASCII compatible. * dir.c (push_glob): set file system encoding when argument encoding is US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (dir_enc_str_new): renamed from dir_enc_str.naruse2008-08-222-8/+17
| | | | | | | | | | * dir.c (dir_read): use dir_enc_str_new. * dir.c (dir_each): ditto. * dir.c (push_pattern): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk: remove config.h dependency.naruse2008-08-222-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (gmtime_r): check if reentrant versions are available.nobu2008-08-223-18/+45
| | | | | | | | * time.c (IF_HAVE_GMTIME_R, ASCTIME, GMTIME, LOCALTIME): use reentrant versions if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (INT2NUM): just use a simple macro on LP64.akr2008-08-212-10/+20
| | | | | | | (UINT2NUM): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_file_open_generic): take filename as a VALUE.akr2008-08-212-10/+20
| | | | | | | | | | | (rb_file_open_internal): ditto. (rb_io_open): ditto. (rb_file_open): pass filename as a VALUE to rb_file_open_internal. (rb_open_file): pass filename as a VALUE to rb_file_open_generic. (open_key_args): pass filename as a VALUE to rb_io_open. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix previsous change again.akr2008-08-211-4/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: fix previous change for LP64.akr2008-08-212-2/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (NUM2LONG): make it inline function to evalueteakr2008-08-212-7/+57
| | | | | | | | | | | | | | | the argument only once. `t = Object.new; def t.*(x) p x; 0 end; p Time.at(0, t)' did print x twice. (NUM2INT): ditto. (NUM2LL): ditto. (INT2NUM): make it inline function. (LONG2NUM): ditto. (UINT2NUM): ditto. (ULONG2NUM): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_s_sysopen): mode can be a Bignum.akr2008-08-212-5/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_extract_modeenc): notify coerced to caller.akr2008-08-212-6/+17
| | | | | | | (rb_io_initialize): mode may be a Bignum. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_extract_modeenc): use rb_check_to_integer to testakr2008-08-212-3/+9
| | | | | | | integer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c (iseq_inspect): don't raise on uninitialized object.akr2008-08-212-2/+12
| | | | | | | show real class name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2008-08-22svn2008-08-211-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_initialize): accept hash argument.akr2008-08-213-13/+32
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): supported %F and %<precision>N.shugo2008-08-214-4/+71
| | | | | | | | | | reverted config.h to ruby.h for Windows. * test/ruby/test_time.rb (TestTime::test_strftime): added tests for %F and %N. * time.c: documented %F and %N. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_m17n_comb.rb (TestM17NComb#test_str_crypt): add key and ↵kazu2008-08-212-1/+6
| | | | | | salt to error message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_stat_inspect): don't raise if self is not initialized.akr2008-08-213-0/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (pst_pid): use rb_attr_get to avoid warning onakr2008-08-213-3/+16
| | | | | | | | Process::Status.allocate.pid. (pst_inspect): don't raise if self is not initialized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_extract_encoding_option): if internal encoding is notakr2008-08-213-3/+287
| | | | | | | specified, enc is external encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test O_NOFOLLOW only on FreeBSD and Linux.akr2008-08-211-2/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c: include ruby/config.h instead of ruby/ruby.h.shugo2008-08-213-2/+7
| | | | | | | * common.mk: removed the old rule for missing/strftime.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: fixed my mail address.shugo2008-08-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): return "UTC" instead of "GMT".shugo2008-08-213-2/+8
| | | | | | | * test/ruby/test_time.rb (test_strftime): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/iconv/test_option.rb (test_ignore_option): skip if iconvnaruse2008-08-202-2/+19
| | | | | | | | doesn't have transliterate. * test/iconv/test_option.rb (test_translit_option): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/scanf.rb (Scanf::FormatSpecifier#initialize): %i should acceptnobu2008-08-203-3/+8
| | | | | | | single digit decimal. [ruby-core:18355] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c (range_initialize_copy): Range is now a Struct.nobu2008-08-203-1/+12
| | | | | | | | | [ruby-core:18353] * struct.c (rb_struct_init_copy): made public. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* svn:eol-stylenobu2008-08-200-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_extract_encoding_option): enc2 is external encoding ifakr2008-08-202-31/+60
| | | | | | | | | | | | | | | | external encoding and internal encoding is given. (pipe_open): add flags and convconfig argument to initialize fptr->{mode,enc,enc2}. (pipe_open_v): pass flags and convconfig from caller to pipe_open. (pipe_open_s): ditto. (pop_last_hash): new function. (rb_io_s_popen): use last hash as option to specify code conversion. (rb_io_open): specify flags and convconfig arguments for pipe_open_s. (rb_f_backquote): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (prep_io): local variable renamed.akr2008-08-202-7/+13
| | | | | | | | (rb_io_fdopen): ditto. (prep_stdio): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 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