From e1d5d4e7f2dce151a2e768d0e2cea38f88185958 Mon Sep 17 00:00:00 2001 From: naruse Date: Sun, 3 Oct 2010 22:57:23 +0000 Subject: * enc/unicode.c (onigenc_unicode_property_name_to_ctype): remove useless assignment. * vm.c (vm_make_proc_from_block): ditto. * variable.c (rb_ivar_count): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 9 +++++++++ enc/unicode.c | 1 - thread.c | 1 - variable.c | 2 +- vm.c | 12 +++--------- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 571479ea45..d2fdef48c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Mon Oct 4 07:16:55 2010 NARUSE, Yui + + * enc/unicode.c (onigenc_unicode_property_name_to_ctype): + remove useless assignment. + + * vm.c (vm_make_proc_from_block): ditto. + + * variable.c (rb_ivar_count): ditto. + Mon Oct 4 06:40:24 2010 NARUSE, Yui * Makefile.in (clean-rdoc): Don't use \ in variable expantion. diff --git a/enc/unicode.c b/enc/unicode.c index e3a314b6f3..3ffe2057cb 100644 --- a/enc/unicode.c +++ b/enc/unicode.c @@ -2091,7 +2091,6 @@ onigenc_unicode_property_name_to_ctype(OnigEncoding enc, UChar* name, UChar* end UChar *p; OnigCodePoint code; - p = name; len = 0; for (p = name; p < end; p += enclen(enc, p, end)) { code = ONIGENC_MBC_TO_CODE(enc, p, end); diff --git a/thread.c b/thread.c index 4063fd8dba..11c87be183 100644 --- a/thread.c +++ b/thread.c @@ -1387,7 +1387,6 @@ ruby_thread_stack_overflow(rb_thread_t *th) { th->raised_flag = 0; #ifdef USE_SIGALTSTACK - th->raised_flag = 0; rb_exc_raise(sysstack_error); #else th->errinfo = sysstack_error; diff --git a/variable.c b/variable.c index 5333aa2d92..6c653ca1d4 100644 --- a/variable.c +++ b/variable.c @@ -1204,7 +1204,7 @@ rb_ivar_count(VALUE obj) switch (TYPE(obj)) { case T_OBJECT: if ((tbl = ROBJECT_IV_INDEX_TBL(obj)) != 0) { - st_index_t i, num = tbl->num_entries, count = 0; + st_index_t i, count, num = tbl->num_entries; const VALUE *const ivptr = ROBJECT_IVPTR(obj); for (i = count = 0; i < num; ++i) { if (ivptr[i] != Qundef) { diff --git a/vm.c b/vm.c index 0ed37363a2..25d2896ed3 100644 --- a/vm.c +++ b/vm.c @@ -453,16 +453,10 @@ rb_vm_stack_to_heap(rb_thread_t * const th) static VALUE vm_make_proc_from_block(rb_thread_t *th, rb_block_t *block) { - VALUE proc = block->proc; - - if (block->proc) { - return block->proc; + if (!block->proc) { + block->proc = rb_vm_make_proc(th, block, rb_cProc); } - - proc = rb_vm_make_proc(th, block, rb_cProc); - block->proc = proc; - - return proc; + return block->proc; } VALUE -- cgit v1.2.3