summaryrefslogtreecommitdiff
path: root/lib/forwardable.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-19 00:07:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-19 00:07:25 +0000
commitd371e3583e3b1e0692f92343017b62d2628190ff ()
treebe82924ada754f8542f394d0a3d28e0a0b02a098 /lib/forwardable.rb
parent1fae66fca28167ca0e25625091c5df49405b8023 (diff)
* lib: revert r31635-r31638 and untabify with expand(1).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/forwardable.rb34
1 files changed, 17 insertions, 17 deletions
@@ -1,9 +1,9 @@
#
# forwardable.rb -
-# $Release Version: 1.1$
-# $Revision$
-# by Keiju ISHITSUKA([email protected])
-# original definition by delegator.rb
# Revised by Daniel J. Berger with suggestions from Florian Gross.
#
# Documentation by James Edward Gray II and Gavin Sinclair
@@ -84,7 +84,7 @@
# def_delegator :Implementation, :service
#
# class Implementation
-# def service...
# end
# end
#
@@ -178,12 +178,12 @@ module Forwardable
def def_instance_delegator(accessor, method, ali = method)
line_no = __LINE__; str = %{
def #{ali}(*args, &block)
- begin
- #{accessor}.__send__(:#{method}, *args, &block)
- rescue Exception
- [email protected]_if{|s| %r"#{Regexp.quote(__FILE__)}"o =~ s} unless Forwardable::debug
- ::Kernel::raise
- end
end
}
# If it's not a class or module, it's an instance
@@ -248,12 +248,12 @@ module SingleForwardable
def def_single_delegator(accessor, method, ali = method)
str = %{
def #{ali}(*args, &block)
- begin
- #{accessor}.__send__(:#{method}, *args, &block)
- rescue Exception
- [email protected]_if{|s| %r"#{Regexp.quote(__FILE__)}"o =~ s} unless Forwardable::debug
- ::Kernel::raise
- end
end
}