Project

General

Profile

Actions

Backport #8154

closed

Remove/fix rb_check_block_call

Added by marcandre (Marc-Andre Lafortune) over 11 years ago. Updated over 11 years ago.


Description

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

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

rb_check_block_call should either be removed or fixed to avoid r36989.


Related issues 1 (0 open1 closed)

Related to Backport200 - Backport #8153: Problems with Enumerable#zip caused by overriding Object#respond_to?Closednagachika (Tomoyuki Chikanaga)03/23/2013Actions
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 11 years 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.


vm_eval.c: preserve passed_block

  • 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 [ruby-core:53650] [Bug #8153].
    [ruby-core:53653] [Bug #8154]
Actions #2

Updated by nagachika (Tomoyuki Chikanaga) over 11 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport200
  • Category deleted (core)
  • Status changed from Closed to Assigned
  • Assignee changed from nobu (Nobuyoshi Nakada) to nagachika (Tomoyuki Chikanaga)
  • Target version deleted (2.1.0)
Actions #3

Updated by nagachika (Tomoyuki Chikanaga) over 11 years 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 [ruby-core:53650] [Bug #8153].
  [ruby-core:53653] [Bug #8154]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0