diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-04 07:30:51 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-04 07:30:51 +0000 |
commit | 16a89660f3609acb317f1d131a1a20f19efde23f (patch) | |
tree | f8e152df417039b1b4943b80e34429123592056c /lib/test/unit/util/procwrapper.rb | |
parent | 18571c1166b7a82bad24b47d0b38bb685fef3bdb (diff) | |
download | ruby-16a89660f3609acb317f1d131a1a20f19efde23f.tar.gz ruby-16a89660f3609acb317f1d131a1a20f19efde23f.tar.xz ruby-16a89660f3609acb317f1d131a1a20f19efde23f.zip |
* test/mini/test_mini_test.rb: recovered. It had been temporarily removed at r19645.
* test/mini/test_mini_mock.rb: ditto.
* test/mini/test_mini_spec.rb: ditto.
* lib/test/**/*: replaced by miniunit.
miniunit had been temporarily reverted at r19643 but now recovred.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/test/unit/util/procwrapper.rb')
-rw-r--r-- | lib/test/unit/util/procwrapper.rb | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/lib/test/unit/util/procwrapper.rb b/lib/test/unit/util/procwrapper.rb deleted file mode 100644 index ad3b4d8a6..000000000 --- a/lib/test/unit/util/procwrapper.rb +++ /dev/null @@ -1,48 +0,0 @@ -#-- -# -# Author:: Nathaniel Talbott. -# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved. -# License:: Ruby license. - -module Test - module Unit - module Util - - # Allows the storage of a Proc passed through '&' in a - # hash. - # - # Note: this may be inefficient, since the hash being - # used is not necessarily very good. In Observable, - # efficiency is not too important, since the hash is - # only accessed when adding and removing listeners, - # not when notifying. - - class ProcWrapper - - # Creates a new wrapper for a_proc. - def initialize(a_proc) - @a_proc = a_proc - @hash = a_proc.inspect.sub(/^(#<#{a_proc.class}:)/, '').sub(/(>)$/, '').hex - end - - def hash # :nodoc: - return @hash - end - - def ==(other) # :nodoc: - case(other) - when ProcWrapper - return @a_proc == other.to_proc - else - return super - end - end - alias :eql? :== - - def to_proc # :nodoc: - return @a_proc - end - end - end - end -end |