From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-09-15T05:05:52+09:00 Subject: Re: not grasping the method overloading/multi-dispatch thing In article <3b3ad3b4.0209132239.2ceb8d91@posting.google.com>, Patrick May wrote: >I just got a better idea for RHDL: > class Signal > def call > proc{self.to_s}.call > end > #.... > def assign_at (relTime=0,nextValue=Proc.new) > nextValue = nextValue.call if nextValue.respond_to? :call > > @eventQueue[relTime] = nextValue > nextValInQueue = @eventQueue.shift > @next_value = nextValInQueue if nextValInQueue > end > > def assign(nextValue=Proc.new) > assign_at(0,nextValue) > end > #.... > end > Patrick, I tried out your code suggestion in RHDL and it seems to work fine (the unit tests still pass ;-). I like it. Thanks. Phil