summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-20 01:54:59 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-20 01:54:59 (GMT)
commitc46ff1bb271afc2375b9b6786a0384426777e551 (patch)
treec104efef184f7b32ba74e98aa0e4cf285cf08c76 /proc.c
parent1da4d51bf93ec9d202b992d6214cba437c229b7c (diff)
* proc.c (proc_new): fix notation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/proc.c b/proc.c
index b8c40a1..79a7829 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 {