summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* * lib/pathname.rb (each_filename): return Enumerator if no blockmame2008-09-231-0/+1
| | | | | | | | | given. * test/pathname/test_pathname.rb: add a test for above. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_env.rb (TestEnv#test_aset): test updated.matz2008-09-221-1/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/readline/test_readline_history.rbkouji2008-09-221-2/+4
| | | | | | | (Readline::TestHistory#test_each): checked return value. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * math.c (math_log): should check argc.tadf2008-09-211-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_s_canonicalize_internal): checks exactness oftadf2008-09-212-62/+93
| | | | | | | | | | | | | imag only. * rational.c (nurat_s_convert): accepts non real value (Rational(a,b) as a/b). * complex.c (nucomp_s_convert): refined. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv/csv.rb: Reworked CSV's parser and generator to be m17n. Datajeg22008-09-2111-20/+527
| | | | | | | | | | | | | | | | | | | | | | | | | | | | is now parsed in the Encoding it is in without need for translation. * lib/csv/csv.rb: Improved inspect() messages for better IRb support. * lib/csv/csv.rb: Fixed header writing bug reported by Dov Murik. * lib/csv/csv.rb: Use custom separators in parsing header Strings as suggested by Shmulik Regev. * lib/csv/csv.rb: Added a :write_headers option for outputting headers. * lib/csv/csv.rb: Handle open() calls in binary mode whenever we can to workaround a Windows issue where line-ending translation can cause an off-by-one error in seeking back to a non-zero starting position after auto-discovery for :row_sep as suggested by Robert Battle. * lib/csv/csv.rb: Improved the parser to fail faster when fed some forms of invalid CSV that can be detected without reading ahead. * lib/csv/csv.rb: Added a :field_size_limit option to control CSV's lookahead and prevent the parser from biting off more data than it can chew. * lib/csv/csv.rb: Added readers for CSV attributes: col_sep(), row_sep(), quote_char(), field_size_limit(), converters(), unconverted_fields?(), headers(), return_headers?(), write_headers?(), header_converters(), skip_blanks?(), and force_quotes?(). * lib/csv/csv.rb: Cleaned up code syntax to be more inline with Ruby 1.9 than 1.8. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c: an instance method image has been removed andtadf2008-09-201-97/+84
| | | | | | | | | | | | | | | | | | | | | | uses "imag" instead of "image". * complex.c: two instance method re and im are removed. * rational.c: follows the above changes. * include/ruby/ruby.h: ditto. * gc.c: ditto. * lib/cmath.rb: ditto. * lib/mathn.rb: ditto. * lib/complex.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json: import JSON v 1.1.3.naruse2008-09-207-36/+104
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: strings which contain only US-ASCII don't force to havenaruse2008-09-191-6/+6
| | | | | | US-ASCII encoding. [ruby-dev:36400] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * prec.c: removed. Precision will be redesigned and be back again.yugui2008-09-197-64/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c.f. [ruby-dev:36352]. * common.mk (COMMON_OBJS): removed prec.o. * inits.c (rb_call_inits): removed Init_Precision. * numeric.c (Init_Numeric): removed inclusion of Precision. removed #induced_from from each class. * rational.c: ditto. * ext/bigdecimal/bigdecimal.c: ditto. * lib/rdoc/knwon_classes.rb: removed the entry for Precision. * test/ruby/test_prec.rb: removed. * test/ruby/test_integer.rb: removed tests for Precision. * test/ruby/test_fixnum.rb: ditto. * test/ruby/test_float.rb: ditto. * test/ruby/test_rational.rb: ditto. * test/ruby/test_complex.rb: ditto. * test/bigdecimal/test_bigdecimal.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regexec.c (string_cmp_ic): add text_end argument.akr2008-09-181-0/+4
| | | | | | | | (slow_search): call enclen with real string end. (map_search): add text_end argument. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c (VpCtoV): 1E1000...000 is interpreted asmame2008-09-181-2/+17
| | | | | | | | | | | | Infinity. [ruby-dev:36159] * ext/bigdecimal/bigdecimal.c (VpPower): Infinity ** 1 returns Infinity instead of NaN. [ruby-dev:36159] * test/bigdecimal/test_bigdecimal.rb: add tests for above. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_comparable): make ascii8bit string to bematz2008-09-181-4/+5
| | | | | | | | | compatible with any other encoding. * string.c (rb_str_cmp): use rb_str_comparable() instead of rb_enc_compatible() since <=> is a comparison anyway. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * grapheme cluster implementation reverted. [ruby-dev:36375]akr2008-09-182-27/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c: add "Error" suffix for Encoding exception classes.matz2008-09-187-179/+179
| | | | | | | | | | a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp> in [ruby-dev:36346]. * encoding.c (Init_Encoding): rename EncodingCompatibilityError to Encoding::CompatibilityError. [ruby-dev:36366] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/bigdecimal/test_bigdecimal.rb: add tests to achieve over 90%mame2008-09-171-0/+681
| | | | | | | test coverage of bigdecimal. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_casecmp): don't use rb_enc_codepoint.akr2008-09-171-0/+12
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_s_convert): accepts complextadf2008-09-171-1/+4
| | | | | | | | value (Complex(a,b) as a+bi). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io.rb (TestIO#test_dup): avoid infinite loop.kazu2008-09-171-5/+1
| | | | | | | | | | [ruby-dev:36326] * test/ruby/test_io.rb (TestIO#test_dup): remove needless open. [ruby-dev:35957] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/html.rb (checkbox_group,radio_group): bug fixxibbar2008-09-171-0/+8
| | | | | | | | | use size instead of bytesize. * test/cgi/test_cgi_tag_helper.rb: test for checkbox_group,radio_group. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c: provides predicate real? instead of scalar?.tadf2008-09-163-10/+14
| | | | | | | | | | * complex.c: follows the above change. * lib/cmath.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io_m17n.rb: use __FILE__ instead of /dev/null.akr2008-09-161-5/+5
| | | | | | | | [ruby-dev:36327] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h (OnigEncodingTypeST): add precise_retakr2008-09-161-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument for mbc_to_code. (ONIGENC_MBC_TO_CODE): provide NULL for precise_ret. (ONIGENC_MBC_PRECISE_CODEPOINT): defined. * include/ruby/encoding.h (rb_enc_mbc_precise_codepoint): defined. * regenc.h (onigenc_single_byte_mbc_to_code): precise_ret argument added. (onigenc_mbn_mbc_to_code): ditto. * regenc.c (onigenc_single_byte_mbc_to_code): precise_ret argument added. (onigenc_mbn_mbc_to_code): ditto. * string.c (count_utf8_lead_bytes_with_word): removed. (str_utf8_nth): removed. (str_utf8_offset): removed. (str_strlen): UTF-8 codepoint oriented optimization removed. (rb_str_substr): ditto. (enc_succ_char): use rb_enc_mbc_precise_codepoint. (enc_pred_char): ditto. (rb_str_succ): ditto. * encoding.c (rb_enc_ascget): check length with rb_enc_mbc_precise_codepoint. (rb_enc_codepoint): use rb_enc_mbc_precise_codepoint. * regexec.c (string_cmp_ic): add text_end argument. (match_at): check end of character after exact string matches. * enc/utf_8.c (graphme_table): defined for extended graphme cluster boundary. (grapheme_cmp): defined. (get_grapheme_properties): defined. (grapheme_boundary_p): defined. (MAX_BYTES_LENGTH): defined. (comb_char_enc_len): defined. (mbc_to_code0): extracted from mbc_to_code. (mbc_to_code): use mbc_to_code0. (left_adjust_combchar_head): defined. (utf_8): use a extended graphme cluster as a unit. * enc/unicode.c (onigenc_unicode_mbc_case_fold): use ONIGENC_MBC_PRECISE_CODEPOINT to extract codepoints. (onigenc_unicode_get_case_fold_codes_by_str): ditto. * enc/euc_jp.c (mbc_to_code): follow mbc_to_code field change. use onigenc_mbn_mbc_to_code. * enc/shift_jis.c (mbc_to_code): ditto. * enc/emacs_mule.c (mbc_to_code): ditto. * enc/gbk.c (gbk_mbc_to_code): follow mbc_to_code field and onigenc_mbn_mbc_to_code change. * enc/cp949.c (cp949_mbc_to_code): ditto. * enc/big5.c (big5_mbc_to_code): ditto. * enc/euc_tw.c (euctw_mbc_to_code): ditto. * enc/euc_kr.c (euckr_mbc_to_code): ditto. * enc/gb18030.c (gb18030_mbc_to_code): ditto. * enc/utf_32be.c (utf32be_mbc_to_code): follow mbc_to_code field change. * enc/utf_16be.c (utf16be_mbc_to_code): ditto. * enc/utf_32le.c (utf32le_mbc_to_code): ditto. * enc/utf_16le.c (utf16le_mbc_to_code): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/core.rb: performance improvement. xibbar2008-09-161-1/+1
| | | | | | | | | From CGIAlt http://cgialt.rubyforge.org/ * test/cgi/test_cgi_header.rb: exception class fixed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_marshal_{dump,load}): preserve instancetadf2008-09-162-0/+4
| | | | | | | | | | variables. * rational.c (nurat_marshal_{dump,load}): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c ():matz2008-09-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * string.c (): * string.c (single_byte_optimizable): make function inline. based on a patch from Michael Selig <michael.selig at fs.com.au> in [ruby-core:18532]. * string.c (str_modify_keep_cr): new function act as rb_str_modify(), but don't clear coderange * string.c (rb_str_casecmp): specialized for single byte strings. * string.c (rb_str_splice): preserve coderange. * string.c (rb_str_slice_bang, rb_str_reverse_bang, rb_str_upcase_bang, rb_str_downcase_bang, tr_trans, rb_str_capitalize_bang, rb_str_swapcase_bang, rb_str_delete_bang, rb_str_chop_bang, rb_str_chomp_bang, rb_str_lstrip_bang, rb_str_rstrip_bang): ditto. * string.c (rb_str_clear): preset coderange. * string.c (rb_str_split_m): specialized for splitting with a string. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io.rb (TestIO#test_dup): exception should bematz2008-09-161-0/+3
| | | | | | raised from IO#dup. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io.rb (TestIO#test_dup): this test might fail ifmatz2008-09-151-16/+7
| | | | | | there are any garbage IO objects. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add assertion message for previous commit.akr2008-09-151-6/+13
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_quote): use rb_enc_mbcput to generate ASCIIakr2008-09-151-0/+6
| | | | | | | incompatible characters properly. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_compatible): accepst other than strings andnaruse2008-09-151-1/+6
| | | | | | | | regexps. [ruby-core:18595] * encoding.c (rb_enc_get_index): works files and encodings. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_eql_p): new.tadf2008-09-151-0/+4
| | | | | | | | | | * complex.c (nucomp_hash): should use hash values of the elements. * rational.c (nurat_hash): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/matrix/test_matrix.rb (setup): typo.yugui2008-09-152-4/+16
| | | | | | | | | | | (test_equality): misdefinition of the expected working. Reported by an anonymous user. (test_hash): added. * test/matrix/test_vector.rb: ditto. Mon Sep 15 03:33:10 2008 Tanaka Akira <akr@fsij.org> git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (str_encode): returns duplicated string if nothingnobu2008-09-141-0/+6
| | | | | | | changed. [ruby-core:18578] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb (Vector#eql?): typo of the method name as "eqn?".yugui2008-09-142-0/+86
| | | | | | | | | | | | (Vector#eqn?): removed. Defined by mistake. Fixes [ruby-dev:36294]. Reported by weda <weda AT issp.u-tokyo.ac.jp> and an anonymous user. * test/matrix/test_matrix.rb: added. * test/matrix/test_vector.rb: added. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (f_{add,mul,sub}): omitted some shortcuts for preservetadf2008-09-141-0/+20
| | | | | | | | | | signed zero anyway. * complex.c (nucomp_negate): new. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c: refined.tadf2008-09-131-1/+1
| | | | | | | | * rational.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/rexml/test_document.rb: removed garbage.shugo2008-09-131-41/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * text/rexml/test_document.rb (test_entity_expansion_limit): added tests.shugo2008-09-131-0/+23
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (rb_econv_prepare_opts): raise ArgumentError ifakr2008-09-121-0/+7
| | | | | | | a broken string is specified as a replacement. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add tests.akr2008-09-121-0/+12
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (validate_enc_binmode): extracted from rb_io_extract_modeenc.akr2008-09-121-0/+18
| | | | | | | | (rb_io_extract_modeenc): use validate_enc_binmode. (io_encoding_set): call validate_enc_binmode. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/escape.trans: transcoder name renamed to use underscore.akr2008-09-121-11/+11
| | | | | | | | * transcode.c: follow the renaming. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (rb_econv_init_by_convpath_i): new function.akr2008-09-121-2/+24
| | | | | | | | (rb_econv_init_by_convpath): new function. (econv_init): use rb_econv_init_by_convpath. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (decorator_names): extracted from rb_econv_open.akr2008-09-121-0/+16
| | | | | | | | | | | | | (rb_econv_open): use decorator_names. (econv_args): extracted from econv_init. (econv_init): use econv_args. (decorate_convpath): new function. (search_convpath_i): new function. (econv_s_search_convpath): new method. (Init_transcode): new method defined. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add tests.akr2008-09-121-0/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/win32ole/test_err_in_callback.rb (teardown): get ridsuke2008-09-111-1/+3
| | | | | | | of infinite loop. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (make_encoding): new function.akr2008-09-101-15/+22
| | | | | | | | | | | (make_encobj): new function. (econv_s_asciicompat_encoding): use make_encoding. (rb_econv_open_exc): use SUPPLEMENTAL_CONVERSION. (econv_convpath): use encoding object in the result. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (econv_convpath): new method.akr2008-09-101-0/+19
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/win32ole/test_err_in_callback.rb: InternetExplorer shouldsuke2008-09-102-15/+19
| | | | | | | | | be closed. * test/win32ole/err_in_callback.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e