diff options
author | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-09 17:06:24 +0000 |
---|---|---|
committer | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-09 17:06:24 +0000 |
commit | 09a7d0173b672e9ba2e0062bf23acbf232afe1cc (patch) | |
tree | a461b65281fdcdeb1e505800b3230c5d2703e1cc | |
parent | 0881fce5165127bff80a0d861b8a0c226b6c8408 (diff) |
lib/delegate.rb: Backport #1781 [ruby-core:24356]; allow a block to be properly passed through.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@28239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/delegate.rb | 12 | ||||
-rw-r--r-- | version.h | 8 |
3 files changed, 15 insertions, 11 deletions
@@ -1,6 +1,10 @@ +Thu Jun 10 01:40:00 Kirk Haines <khaines@ruby-lang.org> + + * lib/delegate.rb: Backport #1781 [ruby-core:24356]; allow a block to be properly passed through. + Wed Jun 9 04:35:00 Kirk Haines <khaines@ruby-lang.org> - * gc.c: Backport #1785 [ruby-core:24395]; check to make sure finalizer_table isn't null before trying to run finalizers. + * gc.c: Backport #1785 [ruby-core:24395]; check to make sure finalizer_table isn't null before trying to run finalizers. r28235 Wed Jun 9 02:10:00 Kirk Haines <khaines@ruby-lang.org> diff --git a/lib/delegate.rb b/lib/delegate.rb index ee5fe8d7fe..66119caaa3 100644 --- a/lib/delegate.rb +++ b/lib/delegate.rb @@ -152,12 +152,12 @@ class Delegator alias initialize_methods initialize # Handles the magic of delegation through \_\_getobj\_\_. - def method_missing(m, *args) + def method_missing(m, *args, &block) target = self.__getobj__ unless target.respond_to?(m) - super(m, *args) + super(m, *args, &block) end - target.__send__(m, *args) + target.__send__(m, *args, &block) end # @@ -265,11 +265,11 @@ def DelegateClass(superclass) def initialize(obj) # :nodoc: @_dc_obj = obj end - def method_missing(m, *args) # :nodoc: + def method_missing(m, *args, &block) # :nodoc: unless @_dc_obj.respond_to?(m) - super(m, *args) + super(m, *args, &block) end - @_dc_obj.__send__(m, *args) + @_dc_obj.__send__(m, *args, &block) end def respond_to?(m, include_private = false) # :nodoc: return true if super @@ -1,15 +1,15 @@ #define RUBY_VERSION "1.8.6" -#define RUBY_RELEASE_DATE "2010-06-09" +#define RUBY_RELEASE_DATE "2010-06-10" #define RUBY_VERSION_CODE 186 -#define RUBY_RELEASE_CODE 20100609 -#define RUBY_PATCHLEVEL 411 +#define RUBY_RELEASE_CODE 20100610 +#define RUBY_PATCHLEVEL 412 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_TEENY 6 #define RUBY_RELEASE_YEAR 2010 #define RUBY_RELEASE_MONTH 6 -#define RUBY_RELEASE_DAY 9 +#define RUBY_RELEASE_DAY 10 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; |