ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:95318] [Ruby master Bug#16250] IRB can't print recursive Arrays or Hashes
       [not found] <redmine.issue-16250.20191014203942@ruby-lang.org>
@ 2019-10-14 20:39 ` asterite+rubybugs
  2019-10-14 20:40 ` [ruby-core:95319] " asterite+rubybugs
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: asterite+rubybugs @ 2019-10-14 20:39 UTC (permalink / raw)
  To: ruby-core

Issue #16250 has been reported by the-asterite (Ary Borenszweig).

----------------------------------------
Bug #16250: IRB can't print recursive Arrays or Hashes
https://bugs.ruby-lang.org/issues/16250

* Author: the-asterite (Ary Borenszweig)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-06-04 trunk 4b7213a85a) [x86_64-darwin18]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
This is on Ruby 2.7.0dev but I'm almost sure it happens on master because this code has no check for recursion: https://github.com/ruby/ruby/blob/c3a626030235c0349e14c6bc07177810daee841c/lib/irb/color.rb#L73-L88

Code to reproduce:

~~~
$ irb
irb(main):001:0> a = []
=> []
irb(main):002:0> a << a
Traceback (most recent call last):
       16: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
       15: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
       14: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
       13: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
       12: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
       11: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
       10: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
        9: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
        8: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
        7: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
        6: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
        5: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
        4: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
        3: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
        2: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
        1: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
SystemStackError (stack level too deep)
Maybe IRB bug!
~~~

Suggested fix: keep a list of visited arrays and hashes. I will try to submit a patch.



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:95319] [Ruby master Bug#16250] IRB can't print recursive Arrays or Hashes
       [not found] <redmine.issue-16250.20191014203942@ruby-lang.org>
  2019-10-14 20:39 ` [ruby-core:95318] [Ruby master Bug#16250] IRB can't print recursive Arrays or Hashes asterite+rubybugs
@ 2019-10-14 20:40 ` asterite+rubybugs
  2019-10-14 21:05 ` [ruby-core:95320] " asterite+rubybugs
  2019-10-15  4:28 ` [ruby-core:95324] " takashikkbn
  3 siblings, 0 replies; 4+ messages in thread
From: asterite+rubybugs @ 2019-10-14 20:40 UTC (permalink / raw)
  To: ruby-core

Issue #16250 has been updated by the-asterite (Ary Borenszweig).


By the way, I had to create a new account to report this bug. I already tried to reset my password for account `asterite@gmail.com` but after I reset it if I try to login it always says the password is incorrect. Could you try verifying "reset password" works fine?

----------------------------------------
Bug #16250: IRB can't print recursive Arrays or Hashes
https://bugs.ruby-lang.org/issues/16250#change-82024

* Author: the-asterite (Ary Borenszweig)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-06-04 trunk 4b7213a85a) [x86_64-darwin18]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
This is on Ruby 2.7.0dev but I'm almost sure it happens on master because this code has no check for recursion: https://github.com/ruby/ruby/blob/c3a626030235c0349e14c6bc07177810daee841c/lib/irb/color.rb#L73-L88

Code to reproduce:

~~~
$ irb
irb(main):001:0> a = []
=> []
irb(main):002:0> a << a
Traceback (most recent call last):
       16: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
       15: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
       14: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
       13: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
       12: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
       11: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
       10: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
        9: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
        8: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
        7: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
        6: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
        5: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
        4: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
        3: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
        2: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
        1: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
SystemStackError (stack level too deep)
Maybe IRB bug!
~~~

Suggested fix: keep a list of visited arrays and hashes. I will try to submit a patch.



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:95320] [Ruby master Bug#16250] IRB can't print recursive Arrays or Hashes
       [not found] <redmine.issue-16250.20191014203942@ruby-lang.org>
  2019-10-14 20:39 ` [ruby-core:95318] [Ruby master Bug#16250] IRB can't print recursive Arrays or Hashes asterite+rubybugs
  2019-10-14 20:40 ` [ruby-core:95319] " asterite+rubybugs
@ 2019-10-14 21:05 ` asterite+rubybugs
  2019-10-15  4:28 ` [ruby-core:95324] " takashikkbn
  3 siblings, 0 replies; 4+ messages in thread
From: asterite+rubybugs @ 2019-10-14 21:05 UTC (permalink / raw)
  To: ruby-core

Issue #16250 has been updated by the-asterite (Ary Borenszweig).


Fix here: https://github.com/ruby/ruby/pull/2555

----------------------------------------
Bug #16250: IRB can't print recursive Arrays or Hashes
https://bugs.ruby-lang.org/issues/16250#change-82025

* Author: the-asterite (Ary Borenszweig)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-06-04 trunk 4b7213a85a) [x86_64-darwin18]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
This is on Ruby 2.7.0dev but I'm almost sure it happens on master because this code has no check for recursion: https://github.com/ruby/ruby/blob/c3a626030235c0349e14c6bc07177810daee841c/lib/irb/color.rb#L73-L88

Code to reproduce:

~~~
$ irb
irb(main):001:0> a = []
=> []
irb(main):002:0> a << a
Traceback (most recent call last):
       16: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
       15: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
       14: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
       13: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
       12: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
       11: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
       10: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
        9: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
        8: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
        7: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
        6: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
        5: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
        4: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
        3: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
        2: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
        1: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
SystemStackError (stack level too deep)
Maybe IRB bug!
~~~

Suggested fix: keep a list of visited arrays and hashes. I will try to submit a patch.



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:95324] [Ruby master Bug#16250] IRB can't print recursive Arrays or Hashes
       [not found] <redmine.issue-16250.20191014203942@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2019-10-14 21:05 ` [ruby-core:95320] " asterite+rubybugs
@ 2019-10-15  4:28 ` takashikkbn
  3 siblings, 0 replies; 4+ messages in thread
From: takashikkbn @ 2019-10-15  4:28 UTC (permalink / raw)
  To: ruby-core

Issue #16250 has been updated by k0kubun (Takashi Kokubun).


Great catch, thanks!

> By the way, I had to create a new account to report this bug. I already tried to reset my password for account asterite@gmail.com but after I reset it if I try to login it always says the password is incorrect. Could you try verifying "reset password" works fine?

I'm not familiar with it so much. Please file another ticket somewhere, maybe https://github.com/ruby/bugs.ruby-lang.org/issues?

----------------------------------------
Bug #16250: IRB can't print recursive Arrays or Hashes
https://bugs.ruby-lang.org/issues/16250#change-82032

* Author: the-asterite (Ary Borenszweig)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-06-04 trunk 4b7213a85a) [x86_64-darwin18]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
This is on Ruby 2.7.0dev but I'm almost sure it happens on master because this code has no check for recursion: https://github.com/ruby/ruby/blob/c3a626030235c0349e14c6bc07177810daee841c/lib/irb/color.rb#L73-L88

Code to reproduce:

~~~
$ irb
irb(main):001:0> a = []
=> []
irb(main):002:0> a << a
Traceback (most recent call last):
       16: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
       15: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
       14: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
       13: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
       12: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
       11: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
       10: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
        9: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
        8: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
        7: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
        6: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
        5: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
        4: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
        3: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `block in inspect_colorable?'
        2: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `inspect_colorable?'
        1: from /Users/asterite/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/irb/color.rb:80:in `all?'
SystemStackError (stack level too deep)
Maybe IRB bug!
~~~

Suggested fix: keep a list of visited arrays and hashes. I will try to submit a patch.



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-15  4:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-16250.20191014203942@ruby-lang.org>
2019-10-14 20:39 ` [ruby-core:95318] [Ruby master Bug#16250] IRB can't print recursive Arrays or Hashes asterite+rubybugs
2019-10-14 20:40 ` [ruby-core:95319] " asterite+rubybugs
2019-10-14 21:05 ` [ruby-core:95320] " asterite+rubybugs
2019-10-15  4:28 ` [ruby-core:95324] " takashikkbn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).