Issue #8531 has been updated by nobu (Nobuyoshi Nakada).

Assignee changed from ko1 (Koichi Sasada) to ktsj (Kazuki Tsujimoto)

?????????????????????с??????????????
----------------------------------------
Bug #8531: ifunc??羝???????????????????掩???????????
https://bugs.ruby-lang.org/issues/8531#change-39977

Author: ktsj (Kazuki Tsujimoto)
Status: Assigned
Priority: Normal
Assignee: ktsj (Kazuki Tsujimoto)
Category: 
Target version: current: 2.1.0
ruby -v: ruby 2.1.0dev (2013-06-15 trunk 41311) [x86_64-linux]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


=begin
ifunc(rb_iterate???bl_proc??????羝????????????)???????????????????у?若?喝?冴??????
羝<????????????????ifunc???????若?????????絖????????????????????c?????障?????(r29335)???

 2072 vm_yield_with_cfunc(rb_thread_t *th, const rb_block_t *block,
 ....
 2107     if (blockargptr) {
 2108         VM_CF_LEP(cfp)[0] = VM_ENVVAL_BLOCK_PTR(blockargptr);
 2109     }

???????????????<?純???????羝?????????????????罨≦?????<?純???????若?喝?冴???????????????障?障?????若?????????膓???????
??掩??????????????障?????????????????障?????#8341???Method#to_proc??篁?????怨??????????????障????????
Symbol#to_proc????с?????罕???с?????

 c = Class.new do
   def foo
     if block_given?
       yield
     else
       puts "No block given."
     end
   end
 end
 
 o = c.new
 f = :foo.to_proc
 f.(o) { puts "Block given." } 
 # => Block given.
 f.(o)
 # => Block given.

??鴻???????????????????????с????????ifunc???羝?????????????????????????с?????????LEP???????с?????(PASS_PASSED_BLOCK?????篏帥??????)???
綣???違?????羝?????????blockarg???篏帥??????????違????????????????句?????????????????????c?????障?????
(罩g∈?????????医???с?????????????с???????Ruby???????с?????Proc?????с??block_given???????膈?????????????)

???????若??????????????篆?絖???????????????????????????????句??????????帥?????ifunc??????rb_method_call????????緇??????????若?喝?冴??????????с????????
?????????????掩???????????障?????????綣?絎潟????????篁ヤ????????????????違?ф検??????????綵≪?篆罩c?????????絋ュ????с??????с??????????????
????????????鴻?т????c??Symbol#to_proc??篆罩c???????????羞私???????障?????(Method#to_proc???ゃ??????#8341??羞私??????????障??)

???????篁??????API???篁?????Proc??????吾?с??????passed_block???????<?純??????????若?喝?冴???????????∽?違?????????????????
??箴??с????????菴?????????????????????障?????????????莨?????茘域????綽?荀???????????????????障?????
=end



-- 
http://bugs.ruby-lang.org/