diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-09 16:36:05 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-09 16:36:05 +0000 |
commit | c05d019cb4778ac04088df69541aab0762d849f8 (patch) | |
tree | 4853726c2bb137517cdcd62ba28eae3492ef1c58 /thread.c | |
parent | a577137cfd523cf685c6b92782a1302ea5260640 (diff) |
merge revision(s) 43208: [Backport #9003]
* compar.c (cmp_eq): fail if recursion. [ruby-core:57736] [Bug #9003]
* thread.c (rb_exec_recursive_paired_outer): new function which is
combinnation of paired and outer variants.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -4878,6 +4878,18 @@ rb_exec_recursive_outer(VALUE (*func) (VALUE, VALUE, int), VALUE obj, VALUE arg) } /* + * If recursion is detected on the current method, obj and paired_obj, + * the outermost func will be called with (obj, arg, Qtrue). All inner + * func will be short-circuited using throw. + */ + +VALUE +rb_exec_recursive_paired_outer(VALUE (*func) (VALUE, VALUE, int), VALUE obj, VALUE paired_obj, VALUE arg) +{ + return exec_recursive(func, obj, rb_obj_id(paired_obj), arg, 1); +} + +/* * call-seq: * thr.backtrace -> array * |