#617: Reopening Symbol Appears to Cause auto malloc[16067]: error for object 0x1016090b0: auto_zone_set_associative_ref -------------------------------+-------------------------------------------- Reporter: cwdinfo@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -------------------------------+-------------------------------------------- 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. }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/617> MacRuby <http://macruby.org/>