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

ruby-changes:39092

From: ko1 <ko1@a...>
Date: Tue, 7 Jul 2015 11:52:41 +0900 (JST)
Subject: [ruby-changes:39092] ko1:r51173 (trunk): * proc.c (rb_method_call): because data->me should be non-NULL,

ko1	2015-07-07 11:52:34 +0900 (Tue, 07 Jul 2015)

  New Revision: 51173

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

  Log:
    * proc.c (rb_method_call): because data->me should be non-NULL,
      do not check data->me
    * proc.c (method_inspect): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/proc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51172)
+++ ChangeLog	(revision 51173)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Jul  7 11:45:14 2015  Koichi Sasada  <ko1@a...>
+
+	* proc.c (rb_method_call): because data->me should be non-NULL,
+	  do not check data->me
+
+	* proc.c (method_inspect): ditto.
+
 Tue Jul  7 11:37:25 2015  Koichi Sasada  <ko1@a...>
 
 	* vm_core.h: remove rb_iseq_t::orig because rb_iseq_clone()
Index: proc.c
===================================================================
--- proc.c	(revision 51172)
+++ proc.c	(revision 51173)
@@ -1848,7 +1848,7 @@ rb_method_call(int argc, const VALUE *ar https://github.com/ruby/ruby/blob/trunk/proc.c#L1848
 static const rb_callable_method_entry_t *
 method_callable_method_entry(struct METHOD *data)
 {
-    if (data->me && data->me->defined_class == 0) rb_bug("method_callable_method_entry: not callable.");
+    if (data->me->defined_class == 0) rb_bug("method_callable_method_entry: not callable.");
     return (const rb_callable_method_entry_t *)data->me;
 }
 
@@ -2324,7 +2324,7 @@ method_inspect(VALUE method) https://github.com/ruby/ruby/blob/trunk/proc.c#L2324
 
     mklass = data->klass;
 
-    if (data->me && data->me->def->type == VM_METHOD_TYPE_ALIAS) {
+    if (data->me->def->type == VM_METHOD_TYPE_ALIAS) {
 	defined_class = data->me->def->body.alias.original_me->owner;
     }
     else {

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

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