Project

General

Profile

Actions

Bug #11977

closed

Bug with array literals caused by r53376

Added by tenderlovemaking (Aaron Patterson) about 8 years ago. Updated about 8 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.4.0dev (2016-01-11 trunk 53499) [x86_64-darwin15]
[ruby-core:72807]

Description

Hi,

I'm seeing a bug with the class name of array literals, and I believe it is caused by r53376 (reverting that commit seems to fix the issue).

The bug is that array literals will have the class name "ThreadSafe::Array" when I expect them to have the class name "Array". Here is the output I'm seeing:

[aaron@TC testing (master)]$ bundle exec ruby -w -e 'p [].class'
Array
[aaron@TC testing (master)]$ bundle exec ruby -w -e 'require "rails"; p [].class'
ThreadSafe::Array
[aaron@TC testing (master)]$

I'm trying to reduce the problem, but so far I can only reproduce this issue inside a Rails application that requires the "concurrent-ruby" gem.

I've posted a test application here:

https://github.com/tenderlove/array_bug.git

I think the bug is to do with autoload handling changes in r53376. Also I've found that you must use bundler, so it could also be related to bundler's manipulation of the load path.

Thanks.


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #13120: p [].class shows ThreadSafe::Array when it expects to show ArrayClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0