Issue #11977 has been updated by Aaron Patterson.


Eric Wong wrote:
> I can't seem to reproduce the problem with array_bug.git on my end.
>  Can you try this?
>  
>  http://80x24.org/spew/20160112021410.27364-1-e%4080x24.org/raw

Thanks for the patch.  That indeed fixes it for me.  Can you apply it?

I guess this is due to the hash table change?  I can't say I fully understand why this fixes it, besides pre-populating the cache.


----------------------------------------
Bug #11977: Bug with array literals caused by r53376
https://bugs.ruby-lang.org/issues/11977#change-56072

* Author: Aaron Patterson
* Status: Open
* Priority: Normal
* Assignee: Eric Wong
* ruby -v: ruby 2.4.0dev (2016-01-11 trunk 53499) [x86_64-darwin15]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
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.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>