* 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:
nobu 2012-08-26 07:53:21 +00:00
Родитель 87450541b3
Коммит 68f3ece33f
4 изменённых файлов: 15 добавлений и 6 удалений

Просмотреть файл

@ -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>
* lib/mkmf.rb (create_makefile): use timestamp for destination

Просмотреть файл

@ -838,7 +838,9 @@ checkmatch
if (flag & VM_CHECKMATCH_ARRAY) {
int 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;
break;
}

Просмотреть файл

@ -645,7 +645,7 @@ enum vm_special_object_type {
/* other frame flag */
#define VM_FRAME_FLAG_PASSED 0x0100
#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) \
(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:
return rb_funcall2(pattern, idEqq, 1, &target);
case VM_CHECKMATCH_TYPE_RESCUE: {
if (!rb_obj_is_kind_of(pattern, rb_cModule)) {
rb_raise(rb_eTypeError, "class or module required for rescue clause");
}
return RTEST(rb_funcall2(pattern, idEqq, 1, &target));
if (!rb_obj_is_kind_of(pattern, rb_cModule)) {
rb_raise(rb_eTypeError, "class or module required for rescue clause");
}
return RTEST(rb_funcall2(pattern, idEqq, 1, &target));
}
default:
rb_bug("check_match: unreachable");