| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
encoding is US-ASCII and string contains 8bit characters.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
without block. [ruby-dev:37526]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
encoding strings. [ruby-core:20526]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
characters. [ruby-dev:37398]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
compares them as strings". [ruby-dev:37398]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
effect expression in RSTRING_PTR.
* string.c (rb_str_split_m): simplified the argument of
RSTRING_LEN.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
C. Mitchell AT gmail.com> at [ruby-talk:321967]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
Shumpei Akai <admin AT flexfrank.net>. [ruby-dev:37265]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
versions for literal strings.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* ext/curses/curses.c (curses_getch): 1.9 getch should return one
character string for single byte string. wchar_t support may
follow in the future.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
encoding.
* string.c (rb_str_upcase_bang): case conversion functions should
not be applicable to strings in dummy encoding. [ruby-dev:36985]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
because ENCODING_GET returns unsigned long.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
unnecessary code. [ruby-cvs:27131]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
string.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
specifying ecflags and ecopts.
* ext/zlib/zlib.c (gzfile_newstr): specify ecflags and ecopts for
conversion using above function.
* ext/zlib/zlib.c (gzfile_newstr): use own rb_econv_t for dummy
encoding to handling stateful encoding (e.g. iso-2022-jp).
[ruby-dev:36857]
* ext/zlib/zlib.c (gzfile_getc): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ruby-dev:36854]
* string.c (rb_external_str_new_cstr): new function to create
string from external NUL terminated C string.
* string.c (rb_locale_str_new_cstr): ditto.
* ext/readline/readline.c: now use rb_locale_str_new_cstr().
* test/sdbm/test_sdbm.rb (TestSDBM#test_delete_with_block):
deleted key to the block may be a copy of specified key.
* test/dbm/test_dbm.rb (TestDBM#test_delete_with_block): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
calculate strlen().
* ext/readline/readline.c: add encoding support.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ext/zlib/zlib.c (struct gzfile): add encoding field to gzfile
structure.
* ext/zlib/zlib.c (rb_gzreader_getc): now works on characters.
* ext/zlib/zlib.c (rb_gzreader_getbyte): new method to retrieve
single byte.
* ext/zlib/zlib.c (rb_gzreader_readbyte): ditto.
* ext/zlib/zlib.c (rb_gzreader_each_byte): renamed from each_char
* ext/zlib/zlib.c (rb_gzreader_ungetc): allow unget strings.
* ext/zlib/zlib.c (rb_gzreader_ungetbyte): renamed from ungetc.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
string in internal encoding to external to export.
* string.c (rb_str_export): new function to do conversion to
external encoding.
* ext/sdbm/init.c: encoding conversion support.
* ext/dbm/dbm.c: ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
from locale to internal encoding.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
external encoding to internal encoding. if something went
wrong, it returns a string with the external encoding.
* string.c (rb_external_str_new_with_enc): same as above besides
you can specify the source encoding.
* ruby.c (ruby_set_argv): use rb_external_str_new()
* ruby.c (set_arg0, ruby_script): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
* string.c (rb_str_rindex_m): need not to call rb_enc_check on
regexp.
* re.c (unescape_escaped_nonascii): try ASCII-8BIT encoding for
broken strings.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
transitive. [ruby-dev:36484]
* test/ruby/test_m17n_comb.rb (TestM17NComb#test_str_eq): test
updated.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
offset and length by bytes. [ruby-dev:36641]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
string.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
[ruby-core:18993]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
the string is dummy.
* string.c (rb_str_rstrip_bang): remove nul characters even if the
encoding of the string is not single byte optimizable.
fixed [ruby-core:18844], reported by Michael Selig.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
the end of strings. [ruby-dev:36497]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
String#<=>.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
* string.c (rb_str_each_codepoint): use UINT2NUM.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
of salt.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
and #each_codepoint. a patch from Michael Selig
<michael.selig at fs.com.au> in [ruby-core:18532].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
| |
* string.c (rb_str_concat): ditto.
* string.c (str_cat_char): ditto.
* string.c (prefix_escape): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: http://svn.ruby-lang.org/repos/ruby/trunk@19364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|