diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-20 01:54:59 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-20 01:54:59 +0000 |
commit | 39e8d093464030ac4abfda406b9b82801c3506ed (patch) | |
tree | c104efef184f7b32ba74e98aa0e4cf285cf08c76 | |
parent | 4ed60476698f95e4dc94125b762a97147bc3e263 (diff) | |
download | ruby-39e8d093464030ac4abfda406b9b82801c3506ed.tar.gz |
* proc.c (proc_new): fix notation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | proc.c | 5 |
2 files changed, 6 insertions, 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 @@ -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 { |