Backport #8154

Remove/fix rb_check_block_call

Added by Marc-Andre Lafortune about 1 year ago. Updated about 1 year ago.

[ruby-core:53653]
Status:Closed
Priority:Normal
Assignee:Tomoyuki Chikanaga

Description

Looking back in the history, I found that commit r36989 (abeedb0875f3) introduced rbcheckblockcall, but (1) it uses obsolete rbiterate and (2) it created a strange bug [#8153].

In r39877, I used rbrespondto + rbblockcall instead. This way Array#zip is similar to Enumerable#zip and Lazy#zip.

rbcheckblock_call should either be removed or fixed to avoid r36989.


Related issues

Related to Backport200 - Backport #8153: Problems with Enumerable#zip caused by overriding Object#... Closed 03/23/2013

Associated revisions

Revision 40281
Added by Tomoyuki Chikanaga about 1 year ago

merge revision(s) 39877,39881: [Backport #8153] [Backport #8154]

* array.c: Avoid zip bug by not using obsolete rb_check_block_call
  [Bug #8153]

* vm_eval.c (check_funcall_respond_to): preserve passed_block, which
  is modified in vm_call0_body() via vm_call0(), and caused a bug of
  rb_check_funcall() by false negative result of rb_block_given_p().
  re-fix  [Bug #8153].
   [Bug #8154]

History

#1 Updated by Nobuyoshi Nakada about 1 year ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r39881.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


vmeval.c: preserve passedblock

  • vmeval.c (checkfuncallrespondto): preserve passedblock, which is modified in vmcall0body() via vmcall0(), and caused a bug of rbcheckfuncall() by false negative result of rbblockgiven_p(). re-fix [Bug #8153]. [Bug #8154]

#2 Updated by Tomoyuki Chikanaga about 1 year ago

  • Tracker changed from Bug to Backport
  • Project changed from ruby-trunk to Backport200
  • Category deleted (core)
  • Status changed from Closed to Assigned
  • Assignee changed from Nobuyoshi Nakada to Tomoyuki Chikanaga
  • Target version deleted (2.1.0)

#3 Updated by Tomoyuki Chikanaga about 1 year ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r40281.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 39877,39881: [Backport #8153] [Backport #8154]

* array.c: Avoid zip bug by not using obsolete rb_check_block_call
  [Bug #8153]

* vm_eval.c (check_funcall_respond_to): preserve passed_block, which
  is modified in vm_call0_body() via vm_call0(), and caused a bug of
  rb_check_funcall() by false negative result of rb_block_given_p().
  re-fix  [Bug #8153].
   [Bug #8154]

Also available in: Atom PDF