summaryrefslogtreecommitdiff
path: root/string.c
AgeCommit message (Collapse)Author
2009-04-08* string.c (rb_str_dump): buffer length plus one byte for nullmame
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
2009-04-08* string.c (rb_str_rstrip_bang): should not sign-expand non-ascii.nobu
[ruby-core:23158] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-08* string.c (rb_str_chop_bang): reset coderange. [ruby-core:23155]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17* dir.c, dln.c, parse.y, re.c, ruby.c, sprintf.c, strftime.c,nobu
string.c, util.c, variable.c: use strlcpy, memcpy and snprintf instead of strcpy, strncpy and sprintf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15* string.c (rb_hash_uint, rb_hash_start, rb_hash_end): use VALUEnobu
rather than unsigned int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14* string.c (rb_str_subpat): accept capture name.akr
(rb_str_aref): follow above change. (rb_str_aref_m): pass the 2nd argument to rb_str_subpat. (rb_str_subpat_set): accept capture name. (rb_str_aset): follow above change. (rb_str_partition): ditto. (rb_str_aset_m): pass the 2nd argument to rb_str_subpat_set. * include/ruby/intern.h (rb_reg_backref_number): declared. * re.c (rb_reg_backref_number): defined. [ruby-core:21057] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12* array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,nobu
numeric.c, pack.c, strftime.c, string.c, thread.c, transcode.c, transcode_data.h, util.c, variable.c, vm_dump.c, include/ruby/encoding.h, missing/crypt.c, missing/vsnprintf.c: suppress VC type warnings. [ruby-core:22726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-10* array.c, bignum.c, gc.c, numeric.c, string.c, util.c, insns.def,nobu
missing/crypt.c, missing/vsnprintf.c, : suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-05* string.c (str_eql): extracted from rb_str_equal and rb_str_eql.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-05* string.c (rb_str_chomp_bang): keeps 7bit coderange.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25* string.c (rb_str_each_line): constified.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25* string.c (rb_str_force_encoding): should clear coderange at changingnobu
encoding. [ruby-core:22437] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24* string.c (rb_str_chomp_bang): coderange may change.nobu
[ruby-core:22414] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24* string.c (rb_str_delete_bang): should recalculate coderange.nobu
[ruby-talk:329267] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22stripped trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22* string.c (tr_trans): should recalculate coderange.nobu
[ruby-core:22326] (reopened at [ruby-core:22328]) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22* string.c (tr_trans): should not be affected by the encoding ofnobu
replacement unless actually modified. [ruby-talk:328967] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-18* array.c (rb_ary_resurrect), string.c (rb_str_resurrect): newnobu
functions based on [ruby-dev:37983] * insns.def (putstring, duparray): use rb_{ary,str}_resurrect(). * iseq.c (iseq_data_to_ary): needs to result TS_VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17* string.c (rb_str_shared_replace): no need fornobu
str_make_independent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14* string.c (rb_hash_uint32, rb_hash_uint, rb_hash_start, rb_hash_end),mame
include/ruby/intern.h: add Murmurhash API. [ruby-dev:37784] * complex.c (nucomp_hash), array.c (rb_ary_hash), time.c (time_hash), string.c (rb_str_hsah), object.c (rb_obj_hash), range.c (range_hash), struct.c (rb_struct_hash), hash.c (rb_any_hash), rational.c (nurat_hash): use Murmurhash. [ruby-dev:37784] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-13* string.c (rb_external_str_new_with_enc): change evaluatioin ordernaruse
for speed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-12* compile.c (compile_array_, defined_expr, iseq_compile_each): hidenobu
and freeze internal literal objects, to prevent from modifying. [ruby-dev:37959] * iseq.c (insn_operand_intern): copy internal literal objects. * insns.def (putstring, duparray): ditto. * string.c (rb_str_replace): exported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05* string.c (rb_str_each_codepoint): update RDoc formatz
String#codepoints. a patch from Radoslaw Bulat in [ruby-core:21835] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04* string.c (rb_str_dump): use MBCLEN_CHARFOUND_P properly.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-21* string.c (hash): suppress a warning.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-20* string.c (hash): fixed the tail bytes handling in the alignednobu
access case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19* string.c (hash): fixed typo. [ruby-dev:37791]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19* string.c (hash): defaulted to MurmurHash 2.0.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19* string.c (hash): added MurmurHash 2.0.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23* string.c (rb_external_str_new_with_enc): set ASCII-8BIT ifmatz
encoding is US-ASCII and string contains 8bit characters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-22* string.c (rb_str_upto): should return enumerator if calledmatz
without block. [ruby-dev:37526] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17* string.c (rb_str_hash): gets rid of collisions between differentnobu
encoding strings. [ruby-core:20526] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-13* string.c (sym_printable): wrong condition for string iteration.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-13* string.c (sym_inspect): quote if symbol contains non-printablematz
characters. [ruby-dev:37398] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-13* string.c (sym_equal): remove documentation error "Otherwise,matz
compares them as strings". [ruby-dev:37398] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-12* string.c (rb_string_value_ptr, rb_to_id): do not use a sidenobu
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/trunk@20651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05* string.c (rb_str_cmp_m): fixed rdoc. pointed out by <Thomasnobu
C. Mitchell AT gmail.com> at [ruby-talk:321967] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04* string.c (sym_to_proc): tabified.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04* string.c (sym_to_proc): use hidden object.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04* string.c (sym_to_proc): caches Symbol procs, based on a patch fromnobu
Shumpei Akai <admin AT flexfrank.net>. [ruby-dev:37265] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-11* include/ruby/intern.h (rb_{external,locale}_str_new_cstr): optimizednobu
versions for literal strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-07* ext/curses/curses.c: curses encoding should obey locale.matz
* 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/trunk@20145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-06* string.c (Init_String): remove Symbol#===. [ruby-dev:37026]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29* string.c (rb_str_check_dummy_enc): new function to check dummymatz
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/trunk@20046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29* string.c (rb_str_cmp): fix condition which always returned truemame
because ENCODING_GET returns unsigned long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24* string.c (rb_str_dump): should have removed commented outmatz
unnecessary code. [ruby-cvs:27131] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24* string.c (rb_str_dump): do not use C++ comment.shyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-23* string.c (rb_str_dump): use \u{ff} escape for UTF-8 encodingmatz
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22* string.c (rb_str_conv_enc_opts): new function to convert withmatz
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
2008-10-22* string.c (rb_external_str_new_with_enc): no implicit strlen call.matz
[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