aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_m17n.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* * string.c (str_nth_len): count ascii-only run at the end. thisnobu2012-01-041-0/+9
| | | | | | | bug appears only when single-byte-optimization is disabled due to unknown coderange. [ruby-core:41896] [Bug #5836] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (rb_enc_uint_chr): fix message format. Bug#4869nobu2011-06-111-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cancel subversion backfire. sorrymatz2011-03-071-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_gc_set_params): allow GC parameter configuration bymatz2011-03-071-1/+0
| | | | | | | environment variables. based on a patch from funny-falcon at https://gist.github.com/856296, but honors safe level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (tr_trans): when the hash for multibyte repl is empty,naruse2011-02-281-0/+1
| | | | | | | tr is inverse mode, and a character doesn't much the table, the character should be replaced by last replacement. Bug #4449 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add a test for the encoding of str_aset. [ruby-core:35142]naruse2011-02-151-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_compatible): change the rule for empty strings:naruse2011-02-151-5/+4
| | | | | | | | remove the special treatment of the US-ASCII encoded empty string. Now Encoding.compatible? usually respect the encoding of the receiver. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_enc_cr_str_buf_cat): remove special treatment ofnaruse2011-02-151-2/+2
| | | | | | | | | ASCII-8BIT receivers. * string.c (str_gsub): set initial encoding of the buffer as the same of the receiver. [ruby-core:35141] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/emacs_mule.c (emacsmule_islead): 7bit range is also leadingnobu2011-01-301-11/+17
| | | | | | byte. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/emacs_mule.c (emacsmule_islead): fix inverse condition.nobu2011-01-301-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_inspect): fix typo (not 0xFD but 0xFE).naruse2010-12-011-0/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_inspect): inspect as a dummy encoding stringnaruse2010-11-301-0/+13
| | | | | | | | | | | | when a UTF-16/32 (not BE/LE) string does not have a BOM. Unicode and some RFCs say that a string labeld as UTF-16/32 doesn't have a BOM, it should be considered big endian. But many Windows programs generates little endian UTF-16 strings without a BOM. So String#inspect treats a string labeled UTF-16/32 withaout a BOM as a dummy encoding string. patched by Martin Duerst. [ruby-core:33461] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix r29848's test.naruse2010-11-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_concat): set ENC_CODERANGE_VALID when thenaruse2010-11-221-0/+1
| | | | | | receiver is 7BIT and the argument is non ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regenc.c (onigenc_minimum_property_name_to_ctype):naruse2010-11-091-0/+8
| | | | | | | | | | | | | | | \p{...} should be case insensitive. [ruby-core:33000] * regenc.c (onigenc_property_list_add_property): ditto. * enc/euc_jp.c (init_property_list, property_name_to_ctype): to lowercase property names. * enc/shift_jis.c (init_property_list, property_name_to_ctype): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_enc_cr_str_buf_cat): concatenation of validnobu2010-11-031-0/+10
| | | | | | | encoding string and invalid encoding string should result invalid encoding. [ruby-core:33027] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* move a non-combinational test.akr2010-10-131-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (int_chr): a codepoint of Ruby M17N must be 32bitnaruse2010-10-121-0/+1
| | | | | | | unsigned int; GB18030 uses MSB. Also note that OnigCodePoint is defined as uisigned int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_inspect): inspect as ASCII when the codepointnaruse2010-05-311-0/+6
| | | | | | of a character in Unicode string is ASCII printable one. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix and add tests for String#inspect. [ruby-dev:41153]naruse2010-05-041-6/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: suppress a warning.akr2010-01-261-2/+2
| | | | | | | | * ext/extmk.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix test when default_external is US-ASCII.naruse2010-01-161-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_inspect): CHAR_ESC_LEN should be 13.naruse2009-12-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (str_utf8_nth): fixed overrun. [ruby-core:26787]nobu2009-11-171-0/+5
| | | | | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_m17n.rb: get rid of empty string interpolationsnobu2009-11-171-43/+43
| | | | | | | confusing ruby-mode.el. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Escape as \x{XXXX} other than Unicode chars.naruse2009-09-291-2/+2
| | | | | | | * string.c (rb_str_inspect): escape as \x{XXXX} when the encoding is other than Unicode. [ruby-dev:39388] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Refine tests arround String#inspect.naruse2009-09-291-35/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_inspect): dump as \uXXXX when thenaruse2009-09-291-24/+33
| | | | | | string is in Unicode. [ruby-dev:39388] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_preprocess_dregexp): change Exception class tonaruse2009-08-141-7/+7
| | | | | | | | | | RegexpError. * test/ruby/test_m17n.rb (test_regexp_usascii): follow above. * test/ruby/test_m17n.rb (test_regexp_embed): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_compatible): If a string is empty andnaruse2009-08-111-0/+2
| | | | | | | other's encoding is US-ASCII, returns the empty string's encoding. [ruby-list:46274] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Follow tests for changes of ENV's encoding.naruse2009-07-131-2/+3
| | | | | | | * test/ruby/test_m17n.rb (TestM17N#test_env): the encoding of ENV is now locale encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_hash.rb (TestHash::test_equal2): recursive hashesmatz2009-05-241-1/+1
| | | | | | | | are handled properly now. ref: [ruby-core:23402] * test/ruby/test_m17n.rb (TestM17N#test_sprintf_p): test fixed git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_dump): buffer length plus one byte for nullmame2009-04-081-0/+3
| | | | | | | | | terminator. [ruby-dev:38294] * test/ruby/test_m17n.rb (test_str_dump): add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * {ext,lib,test}/**/*.rb: removed trailing spaces.nobu2009-03-061-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_force_encoding): should clear coderange at changingnobu2009-02-251-3/+7
| | | | | | | encoding. [ruby-core:22437] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_m17n.rb: feature changed in r20626.yugui2008-12-131-11/+11
| | | | | | follows it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_sub_bang): fix coderange.akr2008-10-021-0/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19662 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * grapheme cluster implementation reverted. [ruby-dev:36375]akr2008-09-181-15/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c: add "Error" suffix for Encoding exception classes.matz2008-09-181-14/+14
| | | | | | | | | | 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19407 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19389 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (enc_compatible_p): add SPECIAL_CONST_P check.naruse2008-08-291-1/+1
| | | | | | * test/ruby/test_m17n.rb (test_compatible): fix test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_m17n.rb: follow EncodingCompatibilityError.naruse2008-08-131-14/+14
| | | | | | | | * test/ruby/test_mixed_unicode_escapes.rb: ditto. * test/ruby/enc/test_utf16.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_yylex): removed an useless conditional, and magicyugui2008-08-011-0/+18
| | | | | | | | | | | comment are ignored unless at the first of line. * test/ruby/test_m17n.rb (test_magic_comment_vim): added. * test/ruby/test_m17n.rb (test_magic_comment_at_variaous_positions): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (unescape_nonascii): add has_property argument not toakr2008-07-041-0/+8
| | | | | | | | | raise error by /\p{Hiragana}\u{3042}/ in EUC-JP script. (rb_reg_preprocess): use has_property argument to make regexp encoding fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (unescape_nonascii): make regexp fixed_encoding if \p is used.akr2008-07-041-0/+19
| | | | | | | fixed [ruby-core:17279]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bootstraptest/test_knownbug.rb: move solved tests.ko12008-05-191-0/+9
| | | | | | | | | | | * bootstraptest/test_eval.rb, test_literal.rb, test_syntax.rb, test_thread.rb: ditto. * test/ruby/test_m17n.rb, test_proc.rb, test_sprintf.rb, test_string.rb, test/ruby/test_struct.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_string.rb: add tests to achieve over 90% testmame2008-05-151-4/+32
| | | | | | | | | | | | | coverage of string.c. * test/ruby/test_m17n.rb: ditto. * test/ruby/test_symbol.rb: ditto. * test/ruby/test_pack.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (tr_find): String#delete returned wrong result when multiplemame2008-05-151-0/+4
| | | | | | | | | utf-8 arguments are passed. * test/ruby/test_m17n.rb (test_delete): add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e