mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* proc.c (proc_new): fix notation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1da4d51bf9
commit
c46ff1bb27
2 changed files with 6 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
Sun Dec 20 10:54:15 2015 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* proc.c (proc_new): fix notation.
|
||||
|
||||
Sun Dec 20 00:29:00 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* proc.c (rb_proc_get_iseq): proc made from symbol does not have
|
||||
|
|
5
proc.c
5
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 {
|
||||
|
|
Loading…
Reference in a new issue