Actions
Bug #1731
closedEnumerable#join with Recursive Structure: "invalid inspect_tbl list for :to_a"
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2dev (2009-07-05 trunk 23958) [i686-linux]
Backport:
Description
=begin
class Enum
include Enumerable
def initialize
@elements = [self]
end
def each
@elements.each {|e| yield e}
end
end
Enum.new.join
This code hangs for a second or so then complains:
$ ruby -vw /tmp/inspect_tbl.rb
ruby 1.9.2dev (2009-07-05 trunk 23958) [i686-linux]
/tmp/inspect_tbl.rb:11:in to_a': invalid inspect_tbl list for :to_a in #<Thread:0x990645c run> (TypeError) from /tmp/inspect_tbl.rb:11:in
join'
from /tmp/inspect_tbl.rb:11:in `'
=end
Updated by runpaint (Run Paint Run Run) almost 15 years ago
=begin
Drat. I filed this against the wrong version; it should be against trunk. :-(
=end
Updated by runpaint (Run Paint Run Run) almost 15 years ago
=begin
Apologies if this is obvious, but I just noticed that if you rescue the aforementioned exception then say File.join(['a','b','c']), File will raise an exception "`join': recursive array (ArgumentError)".
=end
Updated by nobu (Nobuyoshi Nakada) almost 15 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
Applied in changeset r23966.
=end
Actions
Like0
Like0Like0Like0