From: tenderlove@... Date: 2016-01-14T22:11:30+00:00 Subject: [ruby-core:72863] [Ruby trunk - Bug #11977] Bug with array literals caused by r53376 Issue #11977 has been updated by Aaron Patterson. Eric Wong wrote: > tenderlove@ruby-lang.org wrote: > > 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. > > Yes, it used to be order-dependent. > > Populating the cache early means we resolve the name before other entries > have a chance to mess with the ordering. So when an entry is inserted > relative to another still affects how its name is resolved. Ah, interesting. Thank you for the explanation and the fix. I appreciate it! ---------------------------------------- Bug #11977: Bug with array literals caused by r53376 https://bugs.ruby-lang.org/issues/11977#change-56097 * Author: Aaron Patterson * Status: Closed * 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: