diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-15 08:04:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-15 08:04:10 +0000 |
commit | 26adfc185fac192ba0d0f3f75e40159a972a9fe5 (patch) | |
tree | 06d41d47ccfae664671557ae83098d7a72ecf81d /string.c | |
parent | 1b56bcce22a069eba6afb7e36f654783e5b4fbbc (diff) | |
download | ruby-26adfc185fac192ba0d0f3f75e40159a972a9fe5.tar.gz |
* encoding.c (rb_enc_associate_index, rb_enc_get_index): check if
object is encoding capable. [ruby-dev:31780]
* string.c (rb_str_subpat_set): check for if the argument is a String.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1996,6 +1996,7 @@ rb_str_subpat_set(VALUE str, VALUE re, int nth, VALUE val) } end = RMATCH(match)->END(nth); len = end - start; + StringValue(val); rb_enc_check(str, val); rb_str_splice_0(str, start, len, val); } |