--
* string.c (tr_trans): free heap ptr when the str is not embeded.
patched by Eric Wong. [Bug #4956] [ruby-core:37708]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@34430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
--
* string.c (=~): documentation fix; the return value is nil when
it doesn't match. patched by Andrei Kulakov [ruby-core:34562]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
--
* string.c (rb_str_inspect): append for each chars instead of bulk
copy if encoding conversion is needed. [ruby-core:33283]
--
* string.c (rb_str_inspect): fix for ascii-compatible external
encoding and different encoding string. [ruby-core:33283]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
--
* string.c (rb_str_concat): set ENC_CODERANGE_VALID when the
receiver is 7BIT and the argument is non ASCII.
--
Fix r29848's test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
it unpexpectedly changed the behavior of String#<<.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
--
* string.c (rb_str_concat): use unsigned int for GB18030.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
--
* string.c (sym_call), vm.c (invoke_block_from_c),
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/branches/ruby_1_9_2@30023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
--
* string.c (rb_str_times): mentioned about Hash argument. a patch
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/branches/ruby_1_9_2@29797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
--
* string.c (tr_setup_table): initialize negating table when
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.
--
* string.c (tr_setup_table): fix bug in r29146.
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/branches/ruby_1_9_2@29569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
--
* string.c (rb_str_conv_enc_opts): fix infinite loop because
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/branches/ruby_1_9_2@28605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_gsub_bang, rb_str_sub_bang, str_gsub): rdoc fix
based on patch by Run Paint [ruby-core:30938]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
overflow on platforms int is bigger than 32bit, and warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* re.c (rb_reg_expr_str): ASCII incompatible strings
must always escape or converted.
* re.c (rb_reg_expr_str): use rb_str_buf_cat_escaped_char
when resenc is given: for Regexp#inspect or error message.
* re.c (rb_reg_desc): add 'n' for ENCODING_NONE.
* string.c (sym_inspect): Escape when the symbol is not
resulted encoding and not ascii_only. It had escaped
ascii-incompatible string, but it is wrong.
* string.c (rb_str_buf_cat_escaped_char): defined.
Splited from rb_str_inspect.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_inspect): inspect as ASCII when the codepoint
of a character in Unicode string is ASCII printable one.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 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/branches/ruby_1_9_2@27778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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
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
(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
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/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e