Project

General

Profile

Bug #13120

p [].class shows ThreadSafe::Array when it expects to show Array

Added by yahonda (Yasuo Honda) almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0dev (2017-01-10 trunk 57299) [x86_64-linux]
[ruby-core:79039]

Description

It has been filed as Rails issue https://github.com/rails/rails/issues/27631 and found there was a similar bug reported https://bugs.ruby-lang.org/issues/11977 . It looks it reproduces again.

Steps to reproduce:

$ ruby -v
ruby 2.5.0dev (2017-01-10 trunk 57299) [x86_64-linux]
$ bundle -v
Bundler version 1.13.7
$ git clone -b ruby250 https://github.com/yahonda/array_bug.git
$ cd array_bug
$ bundle
$ bundle exec ruby -w -e 'p [].class'
Array
$ bundle exec ruby -w -e 'require "rails"; p [].class'
ThreadSafe::Array

Related issues

Related to Ruby master - Bug #11977: Bug with array literals caused by r53376ClosedActions
Is duplicate of Ruby master - Bug #13114: test failures since r57284ClosedActions

Associated revisions

Revision c763f0fb
Added by nobu (Nobuyoshi Nakada) almost 3 years ago

string.c: block for scrub with ASCII-incompatible

  • string.c (rb_enc_str_scrub): honor the given block with ASCII-incompatible encoding. [ruby-core:79039] [Bug #13120]

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

Revision 57302
Added by nobu (Nobuyoshi Nakada) almost 3 years ago

string.c: block for scrub with ASCII-incompatible

  • string.c (rb_enc_str_scrub): honor the given block with ASCII-incompatible encoding. [ruby-core:79039] [Bug #13120]

Revision 57302
Added by nobu (Nobuyoshi Nakada) almost 3 years ago

string.c: block for scrub with ASCII-incompatible

  • string.c (rb_enc_str_scrub): honor the given block with ASCII-incompatible encoding. [ruby-core:79039] [Bug #13120]

Revision 57302
Added by nobu (Nobuyoshi Nakada) almost 3 years ago

string.c: block for scrub with ASCII-incompatible

  • string.c (rb_enc_str_scrub): honor the given block with ASCII-incompatible encoding. [ruby-core:79039] [Bug #13120]

Revision a3aa4da7
Added by nobu (Nobuyoshi Nakada) almost 3 years ago

string.c: yield invalid part

  • string.c (rb_enc_str_scrub): yield the invalid part only with ASCII-incompatible. [ruby-core:79039] [Bug #13120]

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

Revision 57303
Added by nobu (Nobuyoshi Nakada) almost 3 years ago

string.c: yield invalid part

  • string.c (rb_enc_str_scrub): yield the invalid part only with ASCII-incompatible. [ruby-core:79039] [Bug #13120]

Revision 57303
Added by nobu (Nobuyoshi Nakada) almost 3 years ago

string.c: yield invalid part

  • string.c (rb_enc_str_scrub): yield the invalid part only with ASCII-incompatible. [ruby-core:79039] [Bug #13120]

Revision 57303
Added by nobu (Nobuyoshi Nakada) almost 3 years ago

string.c: yield invalid part

  • string.c (rb_enc_str_scrub): yield the invalid part only with ASCII-incompatible. [ruby-core:79039] [Bug #13120]

Revision 1df80905
Added by nobu (Nobuyoshi Nakada) almost 3 years ago

variable.c: fix the condition to cache

  • variable.c (rb_const_set): fix the condition to cache the class path and cache permanent or temporary path corresponding to the outer klass. [ruby-core:79039] [Bug #13120]

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

Revision 57305
Added by nobu (Nobuyoshi Nakada) almost 3 years ago

variable.c: fix the condition to cache

  • variable.c (rb_const_set): fix the condition to cache the class path and cache permanent or temporary path corresponding to the outer klass. [ruby-core:79039] [Bug #13120]

Revision 57305
Added by nobu (Nobuyoshi Nakada) almost 3 years ago

variable.c: fix the condition to cache

  • variable.c (rb_const_set): fix the condition to cache the class path and cache permanent or temporary path corresponding to the outer klass. [ruby-core:79039] [Bug #13120]

Revision 57305
Added by nobu (Nobuyoshi Nakada) almost 3 years ago

variable.c: fix the condition to cache

  • variable.c (rb_const_set): fix the condition to cache the class path and cache permanent or temporary path corresponding to the outer klass. [ruby-core:79039] [Bug #13120]

Revision 9a663128
Added by naruse (Yui NARUSE) over 2 years ago

merge revision(s) 57302,57303,57304: [Backport #13119]

    string.c: block for scrub with ASCII-incompatible

    * string.c (rb_enc_str_scrub): honor the given block with
      ASCII-incompatible encoding.  [ruby-core:79039] [Bug #13120]
    string.c: yield invalid part

    * string.c (rb_enc_str_scrub): yield the invalid part only with
      ASCII-incompatible.  [ruby-core:79039] [Bug #13120]
    string.c: replacement and block

    * string.c (rb_enc_str_scrub): only one of replacement and block
      is allowed.  [ruby-core:79038] [Bug #13119]

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

Revision 57855
Added by naruse (Yui NARUSE) over 2 years ago

merge revision(s) 57302,57303,57304: [Backport #13119]

string.c: block for scrub with ASCII-incompatible

* string.c (rb_enc_str_scrub): honor the given block with
  ASCII-incompatible encoding.  [ruby-core:79039] [Bug #13120]
string.c: yield invalid part

* string.c (rb_enc_str_scrub): yield the invalid part only with
  ASCII-incompatible.  [ruby-core:79039] [Bug #13120]
string.c: replacement and block

* string.c (rb_enc_str_scrub): only one of replacement and block
  is allowed.  [ruby-core:79038] [Bug #13119]

Revision 04e1afd8
Added by naruse (Yui NARUSE) over 2 years ago

merge revision(s) 57305: [Backport #13114] [Backport #13120]

    variable.c: fix the condition to cache

    * variable.c (rb_const_set): fix the condition to cache the class
      path and cache permanent or temporary path corresponding to the
      outer klass.  [ruby-core:79039] [Bug #13120]

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

Revision 57856
Added by naruse (Yui NARUSE) over 2 years ago

merge revision(s) 57305: [Backport #13114] [Backport #13120]

variable.c: fix the condition to cache

* variable.c (rb_const_set): fix the condition to cache the class
  path and cache permanent or temporary path corresponding to the
  outer klass.  [ruby-core:79039] [Bug #13120]

Revision 8dc3d3fd
Added by usa (Usaku NAKAMURA) over 2 years ago

merge revision(s) 57302,57303,57304: [Backport #13119]

    string.c: block for scrub with ASCII-incompatible

    * string.c (rb_enc_str_scrub): honor the given block with
      ASCII-incompatible encoding.  [ruby-core:79039] [Bug #13120]
    string.c: yield invalid part

    * string.c (rb_enc_str_scrub): yield the invalid part only with
      ASCII-incompatible.  [ruby-core:79039] [Bug #13120]
    string.c: replacement and block

    * string.c (rb_enc_str_scrub): only one of replacement and block
      is allowed.  [ruby-core:79038] [Bug #13119]

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

Revision 58091
Added by usa (Usaku NAKAMURA) over 2 years ago

merge revision(s) 57302,57303,57304: [Backport #13119]

string.c: block for scrub with ASCII-incompatible

* string.c (rb_enc_str_scrub): honor the given block with
  ASCII-incompatible encoding.  [ruby-core:79039] [Bug #13120]
string.c: yield invalid part

* string.c (rb_enc_str_scrub): yield the invalid part only with
  ASCII-incompatible.  [ruby-core:79039] [Bug #13120]
string.c: replacement and block

* string.c (rb_enc_str_scrub): only one of replacement and block
  is allowed.  [ruby-core:79038] [Bug #13119]

Revision 39ee1e95
Added by nagachika (Tomoyuki Chikanaga) over 2 years ago

merge revision(s) 57302,57303,57304: [Backport #13119]

    string.c: block for scrub with ASCII-incompatible

    * string.c (rb_enc_str_scrub): honor the given block with
      ASCII-incompatible encoding.  [ruby-core:79039] [Bug #13120]
    string.c: yield invalid part

    * string.c (rb_enc_str_scrub): yield the invalid part only with
      ASCII-incompatible.  [ruby-core:79039] [Bug #13120]
    string.c: replacement and block

    * string.c (rb_enc_str_scrub): only one of replacement and block
      is allowed.  [ruby-core:79038] [Bug #13119]

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

Revision 58175
Added by nagachika (Tomoyuki Chikanaga) over 2 years ago

merge revision(s) 57302,57303,57304: [Backport #13119]

string.c: block for scrub with ASCII-incompatible

* string.c (rb_enc_str_scrub): honor the given block with
  ASCII-incompatible encoding.  [ruby-core:79039] [Bug #13120]
string.c: yield invalid part

* string.c (rb_enc_str_scrub): yield the invalid part only with
  ASCII-incompatible.  [ruby-core:79039] [Bug #13120]
string.c: replacement and block

* string.c (rb_enc_str_scrub): only one of replacement and block
  is allowed.  [ruby-core:79038] [Bug #13119]

History

#1

Updated by shyouhei (Shyouhei Urabe) almost 3 years ago

  • Related to Bug #11977: Bug with array literals caused by r53376 added
#2

Updated by nobu (Nobuyoshi Nakada) almost 3 years ago

  • Status changed from Open to Closed

Updated by nobu (Nobuyoshi Nakada) almost 3 years ago

  • Status changed from Closed to Open
#4

Updated by nobu (Nobuyoshi Nakada) almost 3 years ago

  • Status changed from Open to Closed

Updated by nobu (Nobuyoshi Nakada) almost 3 years ago

  • Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN to 2.2: DONTNEED, 2.3: DONTNEED, 2.4: REQUIRED
  • Status changed from Closed to Open
#6

Updated by nobu (Nobuyoshi Nakada) almost 3 years ago

  • Is duplicate of Bug #13114: test failures since r57284 added
#7

Updated by nobu (Nobuyoshi Nakada) almost 3 years ago

  • Status changed from Open to Closed

Applied in changeset r57305.


variable.c: fix the condition to cache

  • variable.c (rb_const_set): fix the condition to cache the class path and cache permanent or temporary path corresponding to the outer klass. [ruby-core:79039] [Bug #13120]

Updated by yahonda (Yasuo Honda) almost 3 years ago

Verified that it has been addressed by using revision 57306.

$ ruby -v
ruby 2.5.0dev (2017-01-11 trunk 57306) [x86_64-linux]
$ bundle -v
Bundler version 1.13.7
$ git clone -b ruby250 https://github.com/yahonda/array_bug.git
$ cd array_bug
$ bundle
$ bundle exec ruby -w -e 'p [].class'
Array
$ bundle exec ruby -w -e 'require "rails"; p [].class'
Array
$

Thanks.

Updated by naruse (Yui NARUSE) over 2 years ago

  • Backport changed from 2.2: DONTNEED, 2.3: DONTNEED, 2.4: REQUIRED to 2.2: DONTNEED, 2.3: DONTNEED, 2.4: DONE

ruby_2_4 r57856 merged revision(s) 57305.

Also available in: Atom PDF