summaryrefslogtreecommitdiff
path: root/string.c
AgeCommit message (Collapse)Author
2010-09-24* string.c (sym_call), vm.c (invoke_block_from_c),nobu
vm_insnhelper.c (vm_yield_with_cfunc): pass given block. [ruby-core:32075] * vm_eval.c (rb_funcall_passing_block): new function to call method with passing given block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-24* string.c (rb_str_to_i): fix rdoc: String#to_i raises annaruse
exception when base is invalid. [ruby-core:31685] Fri Sep 24 15:28:35 2010 NARUSE, Yui <naruse@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-24* string.c (rb_str_rindex): use rb_enc_prev_char instead of repeated str_nth.naruse
patched by Michael Selig [ruby-core:32498] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-14* string.c (rb_str_times): mentioned about Hash argument. a patchnobu
from Daniel Bovensiepen at [ruby-core:32386]. * sprintf.c (get_hash): ditto, and fix typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-01* string.c (tr_setup_table): optimized. don't create hash objectsnaruse
when given pattern is ASCII only. * string.c (tr_find): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-30* string.c (tr_setup_table): fix bug in r29146.naruse
Initialize table even if cflag is 0; tr_find see whether del is empty or not. * string.c (tr_find): nodel can't be NULL; if NULL, it means it is not specified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-30* string.c (tr_setup_table): initialize negating table whennaruse
negating string is given. [ruby-core:31851] * string.c (tr_find): add a sentence for the time when target characters include negating one. * string.c (rb_str_count): move definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-27 * string.c (rb_str_prepend): new method by Sora Harakamishyouhei
[Feature #3765] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16Tue Aug 17 07:42:43 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>nobu
* string.c (str_make_independent_expand): set capacity properly. a patch from Peter Weldon at [ruby-core:31734]. [ruby-core:31653] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* configure.in, include/ruby/defines.h (RUBY_FUNC_EXPORTED): macronobu
to declare exported function. * array.c (rb_ary_memsize), string.c (rb_str_memsize), variable.c (rb_objspace_data_type_memsize): used in objspace. [ruby-dev:42022] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05* string.c (rb_str_set_len): bail out when buffer overflowednobu
probably. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05* string.c (rb_str_set_len): should fail to modify shared string.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05* string.c (str_make_independent_expand): fix buffer overflownobu
while shrinking. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-04* string.c (rb_str_resize):: fix r28857 that failed to revert r28851.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-04 * string.c (rb_str_resize): reverted r28851. rb_str_resize cannotnobu
work before the length is set. [ruby-core:31615] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-04* string.c (rb_str_set_len): rb_str_modify cannot work before thenobu
length is set, which is a precondition for rb_str_modify. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-04* string.c (rb_str_resize): should copy the content properly. anobu
patch from Jeremy Evans at [ruby-core:31615]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01* string.c (rb_str_modify_expand, rb_str_resize): get rid ofnobu
repeating malloc and realloc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-20* include/ruby/ruby.h (RSTRING_GETMEM): new macro to get ptr andnobu
len at once. * string.c (rb_str_cmp, str_eql, rb_str_eql): trivial improvements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-08* string.c (rb_str_conv_enc_opts): fix infinite loop becausenaruse
of ISO-2022-JP conversion with empty string. patched by Brian Buchanan [ruby-core:31107] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-05* string.c (NONASCII_MASK): NONASCII_MASK must be unsigned.mame
[ruby-dev:41782] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-30* string.c (rb_str_gsub_bang, rb_str_sub_bang, str_gsub): rdoc fixmarcandre
based on patch by Run Paint [ruby-core:30938] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-06* string.c (rb_str_buf_cat_escaped_char): get rid of buffernobu
overflow on platforms int is bigger than 32bit, and warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-05* string.c (sym_inspect): Escape when the symbol is notnaruse
resulted encoding and not ascii_only. It had escaped ascii-incompatible string, but it is wrong. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-05* string.c (rb_str_buf_cat_escaped_char): defined.naruse
Splited from rb_str_inspect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-31* string.c (rb_str_inspect): inspect as ASCII when the codepointnaruse
of a character in Unicode string is ASCII printable one. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-29* string.c (str_replace_shared): change embedded state atomically.mame
[ruby-core:29953] [ruby-dev:41456] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-28* string.c (sym_inspect): escape ASCII-compatible strings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-28* string.c (rb_str_inspect): escape ASCII-compatible strings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17* proc.c (proc_lambda, unnamed_parameters): Small documentation fixes.marcandre
* re.c: ditto * string.c: ditto * time.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17* array.c: Documentation: change => in call-seq to ->.marcandre
Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-13* array.c: Harmonize documentation, in particular regarding:marcandre
- methods returning enumerators - array methods and argument naming (array -> ary, an_array -> new_ary) - minor improvements, typo fixed and styling issues Other documentation errors fixed: - return value was self instead of a new array (or vice-versa) for Array#{pop,shift,permutation,repeated_permutation,keep_if} - Array#rindex was missing the form with a block. * dir.c: ditto. * enum.c: ditto. Modified Enumerable#reverse_each' documentation to clarify that #each will be finish before any element is yielded. * error.c: ditto. * gc.c: ditto. * hash.c: ditto. * io.c: ditto. IO#{codepoints,each_codepoint} fixed as per [ruby-core:23948] * numeric.c: ditto. * range.c: ditto. * string.c: ditto. * struct.c: ditto. * vm_eval.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-06* string.c (rb_str_match_m): add description about optionalnaruse
position parameter. [ruby-list:47064] patched by KISHIMOTO, Makoto <ksmakoto AT dd.iij4u.or.jp> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30* string.c (rb_str_sub_bang): String#sub! now raises an error whenmarcandre
called on a frozen string, even if no change is made. See [ruby-core:23657] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30* eval.c (make_exception, rb_obj_extend): Fix error messages in case of wrongmarcandre
number of arguments * file.c (rb_f_test, rb_file_s_umask): ditto * numeric.c (int_chr, num_step): ditto * process.c (rb_f_sleep): ditto * re.c (rb_reg_initialize_m): ditto * signal.c (rb_f_kill, sig_trap): ditto * string.c (rb_str_aref_m, rb_str_aset_m, rb_str_count, rb_str_delete_bang, rb_str_slice_bang, rb_str_sub_bang, str_gsub): ditto * proc.c (curry): rdoc fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-14* string.c (rb_string_value_cstr): make NUL terminated if it isnobu
not done. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-20* string.c (rb_str_sum): use UCHAR_MAX.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-18* string.c (rb_str_sum): don't call method for each byte.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-07* io.c: Fix documentation for each/each_line/lines, bytes/each_byte,marcandre
codepoints/each_code_point [ruby-core:23948] * string.c: ditto * ext/stringio/stringio.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-23* string.c (str_new_empty): String#split, partition, rpartitionmame
taints the resulting strings if self is tainted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-10* array.c (rb_ary_push_m, rb_ary_unshift_m, rb_ary_aset),nobu
(rb_ary_insert, rb_ary_replace, rb_ary_concat), (rb_ary_uniq_bang, rb_ary_flatten_bang): check if frozen after wrong number of arguments but before TypeError. [ruby-core:28140] * hash.c (rb_hash_replace): ditto. * string.c (rb_str_replace): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-31* fix the previous previous commit.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-31* string.c (rb_string_value): make no exception for Symbol.mame
[ruby-dev:40274] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25* string.c (rb_str_inspect): suppress a warning.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-24* string.c (rb_str_inspect): increment by rb_enc_mbminlen(enc) forakr
broken byte sequence. [ruby-core:27748] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-24* string.c (rb_enc_strlen_cr): increment by rb_enc_mbminlen(enc) forakr
broken byte sequence. [ruby-core:27748] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-14* string.c (rb_str_concat): fixed range check for Fixnum, andnobu
added checks for integer overflow and invalid char code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-14* string.c (rb_str_concat): raise RangeError when the argument isnaruse
negative value. [ruby-core:27583] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12* string.c (rb_str_set_len): call rb_str_modify.akr
* file.c (realpath_rec): don't call rb_str_modify before rb_str_set_len. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-11* string.c (rb_str_strlen): added. [ruby-dev:40028]naruse
* include/ruby/intern.h (rb_str_strlen): declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e