From c46ff1bb271afc2375b9b6786a0384426777e551 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sun, 20 Dec 2015 01:54:59 +0000 Subject: [PATCH] * proc.c (proc_new): fix notation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ proc.c | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 560ce01468..e9f66dd3ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Dec 20 10:54:15 2015 Koichi Sasada + + * proc.c (proc_new): fix notation. + Sun Dec 20 00:29:00 2015 Nobuyoshi Nakada * proc.c (rb_proc_get_iseq): proc made from symbol does not have diff --git a/proc.c b/proc.c index b8c40a1d84..79a78292f7 100644 --- a/proc.c +++ b/proc.c @@ -645,10 +645,9 @@ proc_new(VALUE klass, int8_t is_lambda) 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 {