aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* * complex.c ({nucomp,numeric}_rect): new.tadf2008-08-292-80/+208
| | | | | | | | | | | | | | | | | | | | | | | * complex.c: added some aliases (::rectangular, ::rect, #rectangular, #rect, #phase, #magnitude). * complex.c (string_to_c_internal): should not strip any null bytes. * rational.c (string_to_r_internal): ditto. * rational.c (i_gcd): reverted to nurat 0.0.2's one. * numeric.c: added an alias (#magnitude). * test/ruby/test_complex.rb: added assertions. * test/ruby/test_rational.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (econv_finish): new method.akr2008-08-281-0/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (econv_convert): new method.akr2008-08-281-0/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (econv_primitive_convert): accept nil asakr2008-08-281-1/+20
| | | | | | | destination_bytesize for unlimited destination size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (econv_primitive_convert): accept nil as input for emptyakr2008-08-281-0/+6
| | | | | | | | input. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): supported %s and %P.shugo2008-08-281-0/+10
| | | | | | | | * time.c (time_strftime): ditto. * test/ruby/test_time.rb (test_strftime): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): fixed a bug of padding.shugo2008-08-281-0/+33
| | | | | | | * test/ruby/test_time.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): Time.mktime(2000).strftime("%-S") shouldshugo2008-08-281-0/+1
| | | | | | | return "0", not "". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_time.rb: suppress warning during test.mame2008-08-281-0/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_time.rb (test_strftime): make test for %a independentmame2008-08-281-1/+2
| | | | | | | from local timezone. [ruby-dev:35992] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/cgi/test_cgi_multipart.rb: add test for multipart.naruse2008-08-284-0/+305
| | | | | | Patch by Takeyuki Fujioka. [ruby-dev:36014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/cgi/test_cgi_modruby.rb: add test for mod_ruby adaptor.naruse2008-08-281-0/+145
| | | | | | Patch by Takeyuki Fujioka. [ruby-dev:36013] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/cgi/test_cgi_header.rb: add test for CGI::Header.naruse2008-08-281-0/+177
| | | | | | Patch by Takeyuki Fujioka. [ruby-dev:36010] [ruby-dev:36011] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* properties.nobu2008-08-271-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_initialize): don't accept IO object. [ruby-dev:35895]akr2008-08-271-25/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c (ole_invoke): WIN32OLE#[] and WIN32OLE#[]=suke2008-08-271-0/+8
| | | | | | | | | accepts number argument. * test/win32ole/test_win32ole.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test.akr2008-08-271-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/cgi/test_cgi_core.rb: add core test.naruse2008-08-271-0/+312
| | | | | | Patch by Takeyuki Fujioka. [ruby-dev:36001] [ruby-dev:36002] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi.rb (CGI::Cookie): remove delagate.naruse2008-08-271-0/+107
| | | | | | | * test/cgi/test_cgi_cookie.rb: added for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_econv_result_t): enumeration constant:akr2008-08-261-1/+13
| | | | | | | | | | | | | | | | | | | | | | econv_incomplete_input. * io.c (finish_writeconv): check econv_incomplete_input. * transcode.c (transcode_restartable0): return econv_incomplete_input for unexpected end of source buffer. (trans_sweep): check econv_incomplete_input. (rb_trans_conv): ditto. (rb_econv_convert0): ditto. (rb_econv_convert): ditto. (transcode_loop): ditto. (make_econv_exception): change message for econv_incomplete_input. (econv_result_to_symbol): return :incomplete_input for econv_incomplete_input. (ecerr_incomplete_input): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (rb_econv_open): disable newline conversion for ASCIIakr2008-08-261-2/+47
| | | | | | | | incompatible encodings. (str_transcode0): don't need disable newline conversion here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_enum.rb (TestEnumerable#test_each_with_object):knu2008-08-261-0/+10
| | | | | | | | Add a test for Enumerable#each_with_object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_enumerator.rb (TestEnumerator#test_with_object):knu2008-08-261-8/+11
| | | | | | | | Add (back) the test for Enumerable#with_object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/cgi/test_cgi_tag_helper.rb: add more tests for html3.naruse2008-08-261-0/+68
| | | | | | Patch by Takeyuki Fujioka. [ruby-dev:35975] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (enumerator_initialize),knu2008-08-261-0/+5
| | | | | | | | | test/ruby/test_enumerator.rb: Add an ability to generate an enumerator from a block. [experimental] [ruby-dev:35903] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_transcode.rb: added test_euc_jpduerst2008-08-261-0/+54
| | | | | | | (contributed by Yoshihiro Kambayashi) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/cgi/test_cgi_tag_helper.rb: added by Takeyuki Fujioka.naruse2008-08-261-0/+253
| | | | | | [ruby-dev:35971] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (make_econv_exception): show readagain part for invalidakr2008-08-251-0/+1
| | | | | | | | byte sequence exception. store the part as an instance variable. (ecerr_readagain_bytes): new method to access the readagain part. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_thread.rb (test_status_and_stop_p): reduce the riskmame2008-08-251-6/+9
| | | | | | | of race condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io.rb (test_dup): fix typo. see [ruby-dev:35958]mame2008-08-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (rb_econv_open_by_transcoder_entries): initializeakr2008-08-251-1/+41
| | | | | | | | | | | last_error. num_trans may be zero. (rb_econv_convert0): num_trans may be zero. (rb_econv_putbackable): ditto. (rb_econv_putback): ditto. (rb_econv_convert): input_ptr and output_ptr may be NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_init_copy): copy encs.akr2008-08-241-2/+29
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_s_pipe): accept optional hash.akr2008-08-241-0/+38
| | | | | | | | | | | | | | | | (rb_io_set_encoding): ditto. (rb_io_extract_modeenc): use rb_econv_opts to initialize ecopts. (rb_file_open_generic): ditto. (rb_file_open_internal): ditto. (io_encoding_set): new argument: opt. (argf_set_encoding): copy fptr->encs.opts to argf_ecopts. * transcode.c (rb_econv_opts): accept Qnil for initialization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_str_transcode): add ecflags argument.akr2008-08-241-0/+63
| | | | | | | | | | | | | | | | | | | | * transcode.c (econv_opts): extracted from str_transcode. (str_transcode_enc_args): extracted from str_transcode. (str_transcode0): extracted from str_transcode. (str_transcode): use econv_opts, str_transcode_enc_args, str_transcode0. (rb_str_transcode): call str_transcode0. (econv_primitive_insert_output): give the additional argument for rb_str_transcode. * io.c (make_writeconv): use invalid/undef flags. (io_fwrite): ditto. (rb_scan_open_args): give the additional argument for rb_str_transcode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_econv_open_exc): declared.akr2008-08-242-5/+5
| | | | | | | | | | | | | * transcode.c (rb_eNoConverter): new exception. (rb_econv_open_exc): new function. (transcode_loop): use rb_econv_open_exc. * io.c (make_writeconv): use rb_econv_open_exc. (make_readconv): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_process.rb (TestProcess#test_rlimit_value): add ↵kazu2008-08-231-2/+2
| | | | | | Errno::EINVAL. [ruby-dev:35900] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/io.h (FMODE_INVALID_MASK): defined.akr2008-08-231-0/+39
| | | | | | | | | | | | | | | | | | | | | (FMODE_INVALID_IGNORE): defined. (FMODE_INVALID_REPLACE): defined. (FMODE_UNDEF_MASK): defined. (FMODE_UNDEF_IGNORE): defined. (FMODE_UNDEF_REPLACE): defined. * io.c (sym_invalid): defined. (sym_undef): defined. (sym_ignore): defined. (sym_replace): defined. (make_readconv): specify ECONV_INVALID_* and ECONV_UNDEF_* if FMODE_INVALID_* and FMODE_UNDEF_* is set. (rb_io_extract_modeenc): check {:invalid, :undef} => {:replace, :ignore} for FMODE_INVALID_* and FMODE_UNDEF_*. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (ECONV_INVALID_MASK): defined.akr2008-08-231-0/+33
| | | | | | | | | | | | | | | | | | | | | (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-231-0/+10
| | | | | | | hash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/io.h (FMODE_TEXTMODE): defined.akr2008-08-222-0/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* * complex.c (nucomp_div): now behaves as quo.tadf2008-08-222-52/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-221-1/+8
| | | | | | | | | | | | 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
* * strftime.c (rb_strftime): supported flags and precision for mostnobu2008-08-221-7/+2
| | | | | | | | | | 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-221-21/+21
| | | | | | | | 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_initialize): accept hash argument.akr2008-08-211-0/+13
| | | | 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-211-0/+12
| | | | | | | | | | 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-211-1/+1
| | | | | | 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-211-0/+1
| | | | 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-211-0/+3
| | | | | | | | 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-211-2/+278
| | | | | | | specified, enc is external encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e