from Symbol to String. This behavior was introduced in r22606,
merged in r22738 to ruby_1_9_1. It was an unexpected language
feature change. It will be removed from Ruby in the 1.9.2.
c.f. [ruby-dev:40274].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
--
* string.c (rb_str_justify): fixed the case a fill size is a
multiple of the length of the padding. [ruby-dev:39856]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
--
Can't use singlebyte optimization when the replacement is multibyte. [ruby-core:24612]
* string.c (tr_trans): can't use singlebyte optimization when
the replacement is multibyte. [ruby-core:24612]
--
* string.c (tr_trans): change condition of singlebyte optimization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
--
* re.c (reg_match_pos): adjust offset based on characters, not
bytes. [ruby-dev:38722]
* string.c (rb_str_offset): new function.
* string.c (rb_str_index_m): no call to rb_reg_adjust_startpos().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
--
* string.c (rb_str_partition): should use the converted result. a
patch from Marc-Andre Lafortune at [ruby-core:23540].
--
* string.c (rb_str_rpartition): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
--
* string.c (rb_str_dump): buffer length plus one byte for null
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/branches/ruby_1_9_1@23334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
--
* string.c (tr_trans): should not be affected by the encoding of
replacement unless actually modified. [ruby-talk:328967]
--
* string.c (tr_trans): should recalculate coderange.
[ruby-core:22326] (reopened at [ruby-core:22328])
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_each_codepoint): update RDoc for
String#codepoints. a patch from Radoslaw Bulat in
[ruby-core:21835]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_external_str_new_with_enc): set ASCII-8BIT if
encoding is US-ASCII and string contains 8bit characters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_upto): should return enumerator if called
without block. [ruby-dev:37526]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_hash): gets rid of collisions between different
encoding strings. [ruby-core:20526]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_string_value_ptr, rb_to_id): do not use a side
effect expression in RSTRING_PTR.
* string.c (rb_str_split_m): simplified the argument of
RSTRING_LEN.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_cmp_m): fixed rdoc. pointed out by <Thomas
C. Mitchell AT gmail.com> at [ruby-talk:321967]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/curses/curses.c: curses encoding should obey locale.
* 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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_check_dummy_enc): new function to check dummy
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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20059 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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19885 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19855 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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e