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

ruby-changes:41138

From: ko1 <ko1@a...>
Date: Sun, 20 Dec 2015 10:55:11 +0900 (JST)
Subject: [ruby-changes:41138] ko1:r53211 (trunk): * proc.c (proc_new): fix notation.

ko1	2015-12-20 10:54:59 +0900 (Sun, 20 Dec 2015)

  New Revision: 53211

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

  Log:
    * proc.c (proc_new): fix notation.

  Modified files:
    trunk/ChangeLog
    trunk/proc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53210)
+++ ChangeLog	(revision 53211)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Dec 20 10:54:15 2015  Koichi Sasada  <ko1@a...>
+
+	* proc.c (proc_new): fix notation.
+
 Sun Dec 20 00:29:00 2015  Nobuyoshi Nakada  <nobu@r...>
 
 	* proc.c (rb_proc_get_iseq): proc made from symbol does not have
Index: proc.c
===================================================================
--- proc.c	(revision 53210)
+++ proc.c	(revision 53211)
@@ -645,10 +645,9 @@ proc_new(VALUE klass, int8_t is_lambda) https://github.com/ruby/ruby/blob/trunk/proc.c#L645
 
     if (procval) {
 	if (SYMBOL_P(procval)) {
-	    if (klass != rb_cProc) return sym_proc_new(klass, procval);
-	    return rb_sym_to_proc(procval);
+	    return (klass != rb_cProc) ? sym_proc_new(klass, procval) : rb_sym_to_proc(procval);
 	}
-	if (RBASIC(procval)->klass == klass) {
+	else if (RBASIC_CLASS(procval) == klass) {
 	    return procval;
 	}
 	else {

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

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