summaryrefslogtreecommitdiff
path: root/string.c
AgeCommit message (Collapse)Author
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
2008-10-21* string.c (rb_external_str_new_with_enc): wrong condition tomatz
calculate strlen(). * ext/readline/readline.c: add encoding support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21* ext/zlib/zlib.c: remove obsolete prototype macros.matz
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20* include/ruby/ruby.h (ExportStringValue): new macro to convertmatz
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
2008-10-20* string.c (rb_locale_str_new): new function to convert stringmatz
from locale to internal encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18* string.c (rb_external_str_new): a new function to convert frommatz
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
2008-10-16* .gdbinit (rp): REGEXP handling fixed.matz
* 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
2008-10-06* string.c (rb_str_comparable): string comparison should bematz
transitive. [ruby-dev:36484] * test/ruby/test_m17n_comb.rb (TestM17NComb#test_str_eq): test updated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-02* string.c (rb_str_sub_bang): fix coderange.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e