[Closed] Array#reject aborts with callcc

Issue #9727 has been updated by Nobuyoshi N…

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

Applied in changeset r45562.

array.c: maybe shared array

  • array.c (ary_reject): may be turned into a shared array during
    the given block. [ruby-dev:48101] [Bug #9727]

Bug #9727: Array#reject aborts with callcc

  • Author: Nobuyoshi N.
  • Status: Closed
  • Priority: Normal
  • Assignee:
  • Category: core
  • Target version: current: 2.2.0
  • ruby -v: r45560
  • Backport: 2.0.0: REQUIRED, 2.1: REQUIRED


require 'continuation'
cont = nil
a = [*1..10].reject do |i|
  callcc{|c| cont = c} if !cont and i == 10
cont.call if a.size < 1000

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs