suppress warnings
* insns.def (checkmatch): suppress warnings. [ruby-core:47310] [Bug #6930] * vm_core.h (VM_FRAME_TYPE_FINISH_P): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
87450541b3
commit
68f3ece33f
@ -1,3 +1,10 @@
|
|||||||
|
Sun Aug 26 16:53:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* insns.def (checkmatch): suppress warnings. [ruby-core:47310]
|
||||||
|
[Bug #6930]
|
||||||
|
|
||||||
|
* vm_core.h (VM_FRAME_TYPE_FINISH_P): ditto.
|
||||||
|
|
||||||
Fri Aug 24 15:42:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Fri Aug 24 15:42:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* lib/mkmf.rb (create_makefile): use timestamp for destination
|
* lib/mkmf.rb (create_makefile): use timestamp for destination
|
||||||
|
@ -838,7 +838,9 @@ checkmatch
|
|||||||
if (flag & VM_CHECKMATCH_ARRAY) {
|
if (flag & VM_CHECKMATCH_ARRAY) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < RARRAY_LEN(pattern); i++) {
|
for (i = 0; i < RARRAY_LEN(pattern); i++) {
|
||||||
if (RTEST(check_match(RARRAY_PTR(pattern)[i], target, flag & VM_CHECKMATCH_TYPE_MASK))) {
|
enum vm_check_match_type checkmatch_type =
|
||||||
|
(enum vm_check_match_type)(flag & VM_CHECKMATCH_TYPE_MASK);
|
||||||
|
if (RTEST(check_match(RARRAY_PTR(pattern)[i], target, checkmatch_type))) {
|
||||||
result = Qtrue;
|
result = Qtrue;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -645,7 +645,7 @@ enum vm_special_object_type {
|
|||||||
/* other frame flag */
|
/* other frame flag */
|
||||||
#define VM_FRAME_FLAG_PASSED 0x0100
|
#define VM_FRAME_FLAG_PASSED 0x0100
|
||||||
#define VM_FRAME_FLAG_FINISH 0x0200
|
#define VM_FRAME_FLAG_FINISH 0x0200
|
||||||
#define VM_FRAME_TYPE_FINISH_P(cfp) ((cfp)->flag & VM_FRAME_FLAG_FINISH)
|
#define VM_FRAME_TYPE_FINISH_P(cfp) (((cfp)->flag & VM_FRAME_FLAG_FINISH) != 0)
|
||||||
|
|
||||||
#define RUBYVM_CFUNC_FRAME_P(cfp) \
|
#define RUBYVM_CFUNC_FRAME_P(cfp) \
|
||||||
(VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CFUNC)
|
(VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CFUNC)
|
||||||
|
@ -1859,10 +1859,10 @@ check_match(VALUE pattern, VALUE target, enum vm_check_match_type type)
|
|||||||
case VM_CHECKMATCH_TYPE_CASE:
|
case VM_CHECKMATCH_TYPE_CASE:
|
||||||
return rb_funcall2(pattern, idEqq, 1, &target);
|
return rb_funcall2(pattern, idEqq, 1, &target);
|
||||||
case VM_CHECKMATCH_TYPE_RESCUE: {
|
case VM_CHECKMATCH_TYPE_RESCUE: {
|
||||||
if (!rb_obj_is_kind_of(pattern, rb_cModule)) {
|
if (!rb_obj_is_kind_of(pattern, rb_cModule)) {
|
||||||
rb_raise(rb_eTypeError, "class or module required for rescue clause");
|
rb_raise(rb_eTypeError, "class or module required for rescue clause");
|
||||||
}
|
}
|
||||||
return RTEST(rb_funcall2(pattern, idEqq, 1, &target));
|
return RTEST(rb_funcall2(pattern, idEqq, 1, &target));
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
rb_bug("check_match: unreachable");
|
rb_bug("check_match: unreachable");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user