Ticket #387 (closed defect: fixed)
inspect with circular references crashes
| Reported by: | jazzbox@… | Owned by: | lsansonetti@… |
|---|---|---|---|
| Priority: | major | Milestone: | MacRuby 0.5 |
| Component: | MacRuby | Keywords: | |
| Cc: |
Description
$ cat insp.rb
class Foo
def initialize bar
@bar = bar
end
end
class Bar
def initialize
@foo = Foo.new(self)
#@bar = self # this crashes too
end
end
puts Bar.new.inspect
$ macruby insp.rb Segmentation fault
$ ruby insp.rb #<Bar:0x1001561d8 @foo=#<Foo:0x100156110 @bar=#<Bar:0x1001561d8 ...>>>
(BTW, this was a very hard one to find for me: Foreign code, multiple nested modules and many, many instance variables. First I thought it has to too witch complexity until I had the idea with the circular reference...)
Change History
Note: See
TracTickets for help on using
tickets.

