summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/string.c b/string.c
index 0a4a789f00..859018e5c1 100644
--- a/string.c
+++ b/string.c
@@ -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);