Project

General

Profile

Backport #8154

Remove/fix rb_check_block_call

Added by marcandre (Marc-Andre Lafortune) about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:53653]

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

Related to Backport200 - Backport #8153: Problems with Enumerable#zip caused by overriding Object#respond_to?Closed03/23/2013Actions

Associated revisions

Revision 04c9bdb1
Added by nobu (Nobuyoshi Nakada) about 6 years ago

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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 39881
Added by nobu (Nobuyoshi Nakada) about 6 years ago

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]

Revision 39881
Added by nobu (Nobuyoshi Nakada) about 6 years ago

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]

Revision 39881
Added by nobu (Nobuyoshi Nakada) about 6 years ago

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]

Revision 39881
Added by nobu (Nobuyoshi Nakada) about 6 years ago

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]

Revision 39881
Added by nobu (Nobuyoshi Nakada) about 6 years ago

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]

Revision 39881
Added by nobu (Nobuyoshi Nakada) about 6 years ago

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]

Revision 59f8d5d1
Added by nagachika (Tomoyuki Chikanaga) about 6 years 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 [ruby-core:53650] [Bug #8153].
  [ruby-core:53653] [Bug #8154]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 40281
Added by nagachika (Tomoyuki Chikanaga) about 6 years 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 [ruby-core:53650] [Bug #8153].
  [ruby-core:53653] [Bug #8154]

History

#1

Updated by nobu (Nobuyoshi Nakada) about 6 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]
#2

Updated by nagachika (Tomoyuki Chikanaga) about 6 years 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 nobu (Nobuyoshi Nakada) to nagachika (Tomoyuki Chikanaga)
  • Target version deleted (2.1.0)
#3

Updated by nagachika (Tomoyuki Chikanaga) about 6 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]

Also available in: Atom PDF