aboutsummaryrefslogtreecommitdiffstats
path: root/encoding.c
Commit message (Collapse)AuthorAgeFilesLines
* * include/ruby/oniguruma.h (OnigEncodingTypeST): add precise_retakr2008-09-161-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 (Encoding#base_encoding): removed. [ruby-dev:36270]naruse2008-09-151-13/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c, include/ruby/ruby.h: rename rb_register_mark_object()ko12008-09-151-1/+2
| | | | | | | | | | | | | | to rb_gc_register_mark_object(). * eval.c, vm.c: initialize vm->mark_object_ary at Init_top_self(). * bignum.c, complex.c, encoding.c, ext/win32ole/win32ole.c, io.c, load.c, marshal.c, rational.c, ruby.c, vm.c: use rb_gc_register_mark_object() instead of rb_global_variable() or rb_gc_register_address(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_squeeze_bang): specialized for 7bit characters inmatz2008-09-151-1/+6
| | | | | | | | | | | | | | | | | | | | | | ASCII compatible strings. * string.c (rb_str_count): ditto. * string.c (tr_trans): preserve 7bit/valid coderange flag. * string.c (rb_str_squeeze_bang): preserve previous coderange value. * string.c (rb_str_lstrip_bang): ditto. * string.c (rb_str_rstrip_bang): ditto. * encoding.c (rb_default_external_encoding): preserve default_external_encoding in a static variable. * string.c (single_byte_optimizable): check coderange first, to reduce number of calling rb_enc_from_index(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_get_index): don't return -1.akr2008-09-151-0/+1
| | | | | | | | | * io.c (rb_scan_open_args): call FilePathValue before encoding conversion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_compatible): accepst other than strings andnaruse2008-09-151-17/+27
| | | | | | | | 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
* * include/ruby/oniguruma.h (OnigCodePoint): unsigned long to unsigned int.naruse2008-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/ruby/encoding.h (rb_enc_codepoint): ditto. * encoding.c (rb_enc_codepoint): signed int to unsigned int. * encoding.c (rb_enc_ascget): ditto. * string.c (rb_str_casecmp): ditto. * string.c (enc_succ_alnum_char): ditto. * string.c (rb_str_inspect): ditto. * string.c (rb_str_upcase_bang): ditto. * string.c (rb_str_downcase_bang): ditto. * string.c (rb_str_capitalize_bang): ditto. * string.c (rb_str_swapcase_bang): ditto. * string.c (struct tr): ditto. * string.c (trnext): ditto. * string.c (tr_trans): ditto. * string.c (tr_setup_table): ditto. * string.c (tr_find): ditto. * string.c (rb_str_delete_bang): ditto. * string.c (rb_str_squeeze_bang): ditto. * string.c (rb_str_count): ditto. * string.c (rb_str_split_m): ditto. * string.c (rb_str_each_line): ditto. * string.c (rb_str_lstrip_bang): ditto. * string.c (rb_str_rstrip_bang): ditto. * string.c (rb_str_intern): ditto. * dir.c (char_casecmp): ditto. * sprintf.c (rb_str_format): ditto. * enc/emacs_mule.c (mbc_to_code): to be 32bit clean. * enc/emacs_mule.c (code_to_mbc): ditto. * enc/gb18030.c (mbc_to_code): ditto. * enc/gb18030.c (code_to_mbc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (enc_compatible_p): use TYPE not BUILTIN_TYPE.naruse2008-08-291-4/+2
| | | | | | [ruby-dev:36048] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (enc_compatible_p): add SPECIAL_CONST_P check.naruse2008-08-291-6/+8
| | | | | | * 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
* * encoding.c (enc_compatible_p): raise TypeError when argument is notnaruse2008-08-291-2/+8
| | | | | | String nor Regexp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_compatible): ASCII compatible string and US-ASCIInaruse2008-08-291-1/+5
| | | | | | | | | | | regexp is compatible. [ruby-dev:36033] * string.c (rb_str_index_m): second argument is position of character. by usa. [ruby-dev:36033] * string.c (rb_str_rindex_m): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (enc_compatible_p): raise TypeError when argument is Encoding.naruse2008-08-231-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_intern_const): tiny optimization.nobu2008-08-161-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_filesystem_encoding): use default external encodingakr2008-08-141-6/+4
| | | | | | | | | | for Unix. * dir.c (dir_initialize): don't cache fs_encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (rb_eEncCompatError): add Exception.naruse2008-08-121-3/+3
| | | | | | | | | | | | | | | | * include/ruby/ruby.h: ditto. * encoding.c (rb_enc_check): use rb_eEncCompatError. * string.c (rb_enc_cr_str_buf_cat): ditto. * string.c (rb_str_sub_bang): ditto. * string.c (rb_str_hex): ditto. * string.c (rb_str_oct): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c: include util.h. [ruby-dev:35715]mame2008-08-101-0/+1
| | | | | | | * common.mk: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_to_encoding_index, rb_to_encoding): check if the namenobu2008-08-051-18/+19
| | | | | | | is ascii compatible as well as Encoding.find. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_filesystem_encoding): use locale encoding on Unix.akr2008-07-211-1/+1
| | | | | | | [ruby-dev:35617] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h (OnigEncoding): removed auxiliary_data.nobu2008-07-041-97/+96
| | | | | | | | | | | | | * include/ruby/encoding.h (ENC_DUMMY_P): moved dummy encoding flag to rb_encoding from Encoding instance. * encoding.c (rb_encoding_list): list of Encoding instances. * encoding.c (struct rb_encoding_entry): moved base encoding from instance variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_utf8_encindex): defined.naruse2008-06-291-0/+6
| | | | | | * include/ruby/encoding.h (rb_utf8_encindex): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_filesystem_encoding): defined.naruse2008-06-161-0/+16
| | | | | | * include/ruby/encoding.h (rb_filesystem_encoding): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.nobu2008-06-091-3/+3
| | | | | | | * *.c: no cache in init functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,ko12008-06-081-1/+1
| | | | | | | | | | | | | | | | | | | enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c, io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c, string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c, vm.c, gc.c: allocated memory objects by xmalloc (ruby_xmalloc) should be freed by xfree (ruby_xfree). * ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c, ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c, ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c, ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c, ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * suppress warnings on cygwin, mingw and mswin.nobu2008-06-011-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * fix for (rb_enc_get_index(obj) == idx) case.naruse2008-05-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c, include/ruby/encoding.hnaruse2008-05-201-4/+5
| | | | | | | (rb_enc_associate, rb_enc_associate_index): returns obj. [ruby-dev:34778] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_ascii8bit_encoding): use ENCINDEX_ASCII.naruse2008-05-201-2/+8
| | | | | | | | | * encoding.c, include/ruby/encoding.h (rb_ascii8bit_encindex): added. * encoding.c (rb_locale_encoding): use rb_usascii_encoding(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regparse.c (PINC): use optimized enclen() instead ofmatz2008-05-191-36/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ONIGENC_MBC_ENC_LEN(). * regparse.c (PFETCH): ditto. * regparse.c (PFETCH): small optimization. * regexec.c (slow_search): single byte encoding optimization. * regenc.h (enclen): avoid calling function when encoding's min_len == max_len. * re.c (rb_reg_regsub): rb_enc_ascget() optimization for single byte encoding. * re.c (rb_reg_search): avoid allocating new re_registers if we already have MatchData. * re.c (match_init_copy): avoid unnecessary onig_region_free() before onig_region_copy. * encoding.c (rb_enc_get_index): remove implicit enc_capable check each time. * encoding.c (rb_enc_set_index): ditto. * encoding.c (enc_compatible_p): small refactoring. * include/ruby/encoding.h (rb_enc_dummy_p): inline rb_enc_dummy_p() and export related code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (enc_init_db): moved to enc/encdb.c.nobu2008-04-071-40/+8
| | | | | | | | | | | | * transcode.c (init_transcoder_table): moved to enc/trans/transdb.c. * enc/depend (enc/encdb.o enc/trans/transdb.o): depend on corresponding headers. * common.mk (COMMONOBJS): moved transcode.o from OBJS git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (enc_check_encoding): should not load autoloaded encodingnobu2008-03-191-1/+1
| | | | | | | | directly, instead use rb_enc_find_index() which deal with alias and replica. [ruby-core:15957] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_associate_index): pass unnecessary enc_capable().matz2008-03-151-1/+1
| | | | | | * string.c (rb_str_cmp): reduce invocation of rb_enc_compatible(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_dummy_p): bootstrap encodings can not be dummy.nobu2008-02-291-2/+4
| | | | | | | | * encoding.c (rb_enc_ascget): no needs to call rb_enc_precise_mbclen() twice. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (enc_capable): IMMEDIATE_P doesn't include Qnil and Qfalse.naruse2008-02-281-1/+1
| | | | | | use SPECIAL_CONST_P. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (enc_find): check type of argument and convert to Stringnaruse2008-02-281-1/+1
| | | | | | if it is StringValue. [ruby-cvs:22866] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Mon Feb 25 10:41:41 2008 Martin Duerst <duerst@it.aoyama.ac.jp>duerst2008-02-251-3/+3
| | | | | | | | | * encoding.c (Encoding#dummy): minor grammatical fixes in rdoc documentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_mbclen): return minlen instead of 1 whenakr2008-02-221-2/+4
| | | | | | | | | | | | | | a character is not found properly. * string.c (rb_enc_strlen): round up string length with fixed multibyte encoding such as UTF-32. (rb_enc_strlen_cr): ditto. (rb_str_substr): fix substring with fixed multibyte encoding. (rb_str_justify): check number of characters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_times): empty string's coderange is CODERANGE_7BIT.naruse2008-02-211-4/+4
| | | | | | | | | * string.c (rb_str_substr): ditto. * encoding.c (rb_enc_compatible): empty string is compatible with not only nonasciicompatible strings. [ruby-dev:33895] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_associate_index): doesn't clear coderangenaruse2008-02-201-0/+2
| | | | | | when new encoding equals to old one. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_compatible): check encoding incapable arguments.akr2008-02-161-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_compatible): empty strings are always compatible.akr2008-02-161-1/+8
| | | | | | | * string.c (rb_enc_cr_str_buf_cat): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_strlen): moved to string.c.akr2008-02-161-17/+0
| | | | | | | | | * string.c (rb_enc_strlen): use search_nonascii. (str_strlen): don't use search_nonascii. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_nth): moved to string.c.akr2008-02-151-22/+0
| | | | | | | | | | | * string.c (rb_enc_nth): moved from string.c. use search_nonascii for ASCII compatible string. (str_nth): wrong optimization removed to fix "a".force_encoding("EUC-JP").slice!(0,10) returns "a\x00\x00\x00\x00\x00\x00\x00\x00\x00" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (str_strlen): use search_nonascii() for performance.matz2008-02-151-2/+2
| | | | | | * string.c (str_nth): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (encdb_{replicate,alias,dummy,declare}): define only ifnobu2008-01-291-3/+13
| | | | | | | NO_ENCDB_H is not defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dmyencoding.c, encoding.c (enc_init_db, NO_ENCDB_H):naruse2008-01-291-0/+4
| | | | | | | | | miniruby doesn't use encdb. * common.mk: encdb.h use miniruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h: precise mbclen API redesigned to avoidakr2008-01-271-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | inline functions. (onigenc_mbclen_charfound): removed. (onigenc_mbclen_needmore): removed. (onigenc_mbclen_recover): removed. (ONIGENC_MBCLEN_CHARFOUND): removed. (ONIGENC_MBCLEN_CHARFOUND_P): defined. (ONIGENC_MBCLEN_CHARFOUND_LEN): defined. (ONIGENC_MBCLEN_INVALID): removed. (ONIGENC_MBCLEN_INVALID_P): defined. (ONIGENC_MBCLEN_NEEDMORE): removed. (ONIGENC_MBCLEN_NEEDMORE_P): defined. (ONIGENC_MBCLEN_NEEDMORE_LEN): defined. (ONIGENC_MBC_ENC_LEN): use onigenc_mbclen_approximate. * regenc.c (onigenc_mbclen_approximate): defined. * include/ruby/encoding.h (MBCLEN_CHARFOUND): removed. (MBCLEN_INVALID): removed. (MBCLEN_NEEDMORE): removed. (MBCLEN_CHARFOUND_P): defined. (MBCLEN_INVALID_P): defined. (MBCLEN_NEEDMORE_P): defined. (MBCLEN_CHARFOUND_LEN): defined. (MBCLEN_NEEDMORE_LEN): defined. * encoding.c: use new API. * re.c: ditto. * string.c: ditto. * parse.y: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_usascii_new{,2}: defined.naruse2008-01-251-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (rb_str_new): set US-ASCII and ENC_CODERANGE_7BIT when empty string. * encoding.c (rb_usascii_encoding, rb_usascii_encindex): defined. (rb_enc_inspect, enc_name, rb_locale_charmap, rb_enc_name_list_i): use rb_str_ascii_new. * array.c (recursive_join, inspect_ary): ditto. * object.c (nil_to_s, nil_inspect, true_to_s, false_to_s, rb_mod_to_s): ditto. * hash.c (inspect_hash, rb_hash_inspect, rb_f_getenv, env_fetch, env_clear, env_to_s, env_inspect): ditto. * numeric.c (flo_to_s, int_chr, rb_fix2str): ditto. * bignum.c (rb_big2str): ditto. * file.c (rb_file_ftype, rb_file_s_dirname, rb_file_s_extname, file_inspect_join, Init_file): ditto. * test/ruby/test_ruby_m17n.rb: add checks for encoding of string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.{c, h} (rb_usascii_encoding): added.naruse2008-01-231-0/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_compatible): wrong compatibility condition.matz2008-01-221-0/+1
| | | | | | [ruby-dev:33273] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (MINIRUBY): remove -I$(EXTOUT)/$(arch) frommatz2008-01-221-8/+14
| | | | | | | | | | | | | | | MINIRUBY since miniruby might not be able to load DLL. * test/ruby/test_m17n.rb: move tests from bootstrap test. * encoding.c (enc_find): should check name if ASCII compatible. * string.c (rb_str_end_with): should check character boundary. * encoding.c (rb_enc_compatible): encoding must be ASCII compatible before checking ENC_CODERANGE_7BIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e