[前][次][番号順一覧][スレッド一覧]

ruby-changes:24774

From: nobu <ko1@a...>
Date: Sun, 26 Aug 2012 16:53:32 +0900 (JST)
Subject: [ruby-changes:24774] nobu:r36825 (trunk): suppress warnings

nobu	2012-08-26 16:53:21 +0900 (Sun, 26 Aug 2012)

  New Revision: 36825

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36825

  Log:
    suppress warnings
    
    * insns.def (checkmatch): suppress warnings.  [ruby-core:47310]
      [Bug #6930]
    * vm_core.h (VM_FRAME_TYPE_FINISH_P): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/insns.def
    trunk/vm_core.h
    trunk/vm_insnhelper.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 36824)
+++ ChangeLog	(revision 36825)
@@ -1,3 +1,10 @@
+Sun Aug 26 16:53:00 2012  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@r...>
 
 	* lib/mkmf.rb (create_makefile): use timestamp for destination
Index: insns.def
===================================================================
--- insns.def	(revision 36824)
+++ insns.def	(revision 36825)
@@ -838,7 +838,9 @@
     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;
 	    }
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 36824)
+++ vm_core.h	(revision 36825)
@@ -645,7 +645,7 @@
 /* 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)
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 36824)
+++ vm_insnhelper.c	(revision 36825)
@@ -1859,10 +1859,10 @@
       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");

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]