Ticket #617 (closed defect: fixed)
Reopening Symbol Appears to Cause auto malloc[16067]: error for object 0x1016090b0: auto_zone_set_associative_ref
| Reported by: | cwdinfo@… | Owned by: | lsansonetti@… |
|---|---|---|---|
| Priority: | blocker | Milestone: | MacRuby 0.7 |
| Component: | MacRuby | Keywords: | |
| Cc: |
Description
This works in MRI 1.87 and 1.9.1.
#!/usr/local/bin/macruby
class Predicate
OPERATOR_MAP = {
:gt => '>',
:lt => '<',
:eq => '='
}
def initialize(obj, operator, rhs)
@obj = obj.to_s
@predicate = to_condition(operator, rhs)
end
def gt(rhs)
@predicate << @conjoin
@predicate << to_condition(:gt, rhs)
self
end
def lt(rhs)
@predicate << @conjoin
@predicate << to_condition(:lt, rhs)
self
end
def eq(rhs)
@predicate << @conjoin
@predicate << to_condition(:lt, rhs)
self
end
def and
@conjoin = ' and '
self
end
def or
@conjoin = ' or '
self
end
def to_condition(operator, rhs)
"#{@obj} #{OPERATOR_MAP[operator]} #{rhs}"
end
def to_s
@predicate
end
end
class Symbol
def gt(value)
@predicate = Predicate.new(self, :gt, value)
end
def lt(value)
@predicate = Predicate.new(self, :lt, value)
end
def eq(value)
@predicate = Predicate.new(self, :eq, value)
end
end
puts :start_time.eq('2010-10-01')
puts :start_time.eq('2010-10-01').and.lt('2010-10-03')}}}
Error is:
macruby(16067,0x7fff70f36be0) malloc: *** auto malloc[16067]: error for object 0x1016090b0: auto_zone_set_associative_ref: object should point to a GC block or a global address, otherwise associations will leak. Break on auto_zone_association_error() to debug.
Change History
Note: See
TracTickets for help on using
tickets.

