diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-17 08:58:50 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-17 08:58:50 +0000 |
commit | 26eb8e4b4e39aee7c1e4e9c061c9c17daaafc78b (patch) | |
tree | 16905c844eb3e10fb7c7b8f0f18a13faf2ea8410 /string.c | |
parent | 4bf78945ffe3fe696605a82ffcdcd69a4250667e (diff) |
merge revision(s) 51470: [Backport #11413]
* re.c (rb_memsearch): should match only char boundaries in wide
character encodings. [ruby-core:70220] [Bug #11413]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@51615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -6213,15 +6213,10 @@ rb_str_split_m(int argc, VALUE *argv, VALUE str) } enc = STR_ENC_GET(str); - if (NIL_P(spat)) { - if (!NIL_P(rb_fs)) { - spat = rb_fs; - goto fs_set; - } + if (NIL_P(spat) && NIL_P(spat = rb_fs)) { split_type = awk; } else { - fs_set: if (RB_TYPE_P(spat, T_STRING)) { rb_encoding *enc2 = STR_ENC_GET(spat); |