Ticket #185 (closed defect: fixed)
Redefining singleton methods on multiple objects at the same place
| Reported by: | vincent.isambart@… | Owned by: | lsansonetti@… |
|---|---|---|---|
| Priority: | major | Milestone: | MacRuby 0.5 |
| Component: | MacRuby | Keywords: | |
| Cc: |
Description
The following code causes a warning. The problem is when 2 different objects have a method defined on their singleton class at the same place.
def func(obj)
def obj.a
p self.description
p self.class.ancestors
super
end
end
class A
def a
end
end
o1 = A.new
o2 = A.new
func(o1)
func(o2)
puts 'o1'
o1.a
puts 'o2'
o2.a
Change History
Note: See
TracTickets for help on using
tickets.

