3
# Author:: Nathaniel Talbott.
4
# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
5
# License:: Ruby license.
11
# Allows the storage of a Proc passed through '&' in a
14
# Note: this may be inefficient, since the hash being
15
# used is not necessarily very good. In Observable,
16
# efficiency is not too important, since the hash is
17
# only accessed when adding and removing listeners,
22
# Creates a new wrapper for a_proc.
23
def initialize(a_proc)
25
@hash = a_proc.inspect.sub(/^(#<#{a_proc.class}:)/){''}.sub(/(>)$/){''}.hex
35
return @a_proc == other.to_proc