summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--string.c2
-rw-r--r--version.h2
-rw-r--r--vm.c2
4 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ad58d69bb8..27f3a40562 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Aug 16 13:52:42 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm.c (vm_set_main_stack): remove unnecessary check. toplevel
+ binding must be initialized. [Bug #12611] (N1)
+
+ * string.c (rb_str_split_m): simplify the condition.
+ [Bug #12611](N4)
+
Tue Aug 16 13:42:42 2016 Naohisa Goto <ngotogenome@gmail.com>
* thread.c (rb_wait_for_single_fd): Clean up fds.revents every time
diff --git a/string.c b/string.c
index 1f2ae5f044..9115ad1bde 100644
--- a/string.c
+++ b/string.c
@@ -6523,7 +6523,7 @@ rb_str_split_m(int argc, VALUE *argv, VALUE str)
beg = start;
}
else {
- if (ptr+start == ptr+len)
+ if (start == len)
start++;
else
start += rb_enc_fast_mbclen(ptr+start,ptr+len,enc);
diff --git a/version.h b/version.h
index 7d4152e7cc..4373d62228 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.2.6"
#define RUBY_RELEASE_DATE "2016-08-16"
-#define RUBY_PATCHLEVEL 353
+#define RUBY_PATCHLEVEL 354
#define RUBY_RELEASE_YEAR 2016
#define RUBY_RELEASE_MONTH 8
diff --git a/vm.c b/vm.c
index 5285f87df8..78de622d31 100644
--- a/vm.c
+++ b/vm.c
@@ -245,7 +245,7 @@ vm_set_main_stack(rb_thread_t *th, VALUE iseqval)
/* save binding */
GetISeqPtr(iseqval, iseq);
- if (bind && iseq->local_size > 0) {
+ if (iseq->local_size > 0) {
bind->env = rb_vm_make_env_object(th, th->cfp);
}
}