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

ruby-changes:32616

From: nagachika <ko1@a...>
Date: Thu, 23 Jan 2014 21:40:57 +0900 (JST)
Subject: [ruby-changes:32616] nagachika:r44695 (ruby_2_0_0): merge revision(s) 43913: [Backport #8872] [Backport #9175]

nagachika	2014-01-23 21:40:52 +0900 (Thu, 23 Jan 2014)

  New Revision: 44695

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

  Log:
    merge revision(s) 43913: [Backport #8872] [Backport #9175]
    
    * vm_insnhelper.c (check_match): Fix SEGV with VM_CHECKMATCH_TYPE_CASE
      and class of `pattern` has `method_missing`
      [Bug #8882] [ruby-core:58606]

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/version.h
    branches/ruby_2_0_0/vm_insnhelper.c
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 44694)
+++ ruby_2_0_0/ChangeLog	(revision 44695)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Thu Jan 23 21:08:16 2014  Shota Fukumori  <her@s...>
+
+	* vm_insnhelper.c (check_match): Fix SEGV with VM_CHECKMATCH_TYPE_CASE
+	  and class of `pattern` has `method_missing`
+	  [Bug #8882] [ruby-core:58606]
+
 Mon Jan 20 01:02:18 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/bigdecimal/bigdecimal.c (CLASS_NAME): macro to wrap
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 44694)
+++ ruby_2_0_0/version.h	(revision 44695)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
-#define RUBY_RELEASE_DATE "2014-01-20"
-#define RUBY_PATCHLEVEL 388
+#define RUBY_RELEASE_DATE "2014-01-23"
+#define RUBY_PATCHLEVEL 389
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 1
-#define RUBY_RELEASE_DAY 20
+#define RUBY_RELEASE_DAY 23
 
 #include "ruby/version.h"
 
Index: ruby_2_0_0/vm_insnhelper.c
===================================================================
--- ruby_2_0_0/vm_insnhelper.c	(revision 44694)
+++ ruby_2_0_0/vm_insnhelper.c	(revision 44695)
@@ -935,7 +935,13 @@ check_match(VALUE pattern, VALUE target, https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/vm_insnhelper.c#L935
       case VM_CHECKMATCH_TYPE_CASE: {
 	VALUE defined_class;
 	rb_method_entry_t *me = rb_method_entry_with_refinements(CLASS_OF(pattern), idEqq, &defined_class);
-	return vm_call0(GET_THREAD(), pattern, idEqq, 1, &target, me, defined_class);
+	if (me) {
+	  return vm_call0(GET_THREAD(), pattern, idEqq, 1, &target, me, defined_class);
+	}
+	else {
+	  /* fallback to funcall (e.g. method_missing) */
+	  return rb_funcall2(pattern, idEqq, 1, &target);
+	}
       }
       default:
 	rb_bug("check_match: unreachable");

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r43913


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

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