ruby-changes:12436
From: shyouhei <ko1@a...>
Date: Thu, 16 Jul 2009 09:35:29 +0900 (JST)
Subject: [ruby-changes:12436] Ruby:r24136 (ruby_1_8_7): merge revision(s) 23380:
shyouhei 2009-07-16 09:35:14 +0900 (Thu, 16 Jul 2009) New Revision: 24136 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24136 Log: merge revision(s) 23380: * lib/delegate.rb (Delegator#method_missing) (DelegateClass()#method_missing): Properly pass a given block through. [ruby-dev:38390] Modified files: branches/ruby_1_8_7/ChangeLog branches/ruby_1_8_7/lib/delegate.rb branches/ruby_1_8_7/version.h Index: ruby_1_8_7/ChangeLog =================================================================== --- ruby_1_8_7/ChangeLog (revision 24135) +++ ruby_1_8_7/ChangeLog (revision 24136) @@ -1,3 +1,9 @@ +Thu Jul 16 09:35:06 2009 Akinori MUSHA <knu@i...> + + * lib/delegate.rb (Delegator#method_missing) + (DelegateClass()#method_missing): Properly pass a given block + through. [ruby-dev:38390] + Wed Jul 15 11:40:34 2009 Nobuyoshi Nakada <nobu@r...> * file.c (rb_file_join): recursive array has no meaning as path Index: ruby_1_8_7/version.h =================================================================== --- ruby_1_8_7/version.h (revision 24135) +++ ruby_1_8_7/version.h (revision 24136) @@ -1,15 +1,15 @@ #define RUBY_VERSION "1.8.7" -#define RUBY_RELEASE_DATE "2009-07-15" +#define RUBY_RELEASE_DATE "2009-07-16" #define RUBY_VERSION_CODE 187 -#define RUBY_RELEASE_CODE 20090715 -#define RUBY_PATCHLEVEL 184 +#define RUBY_RELEASE_CODE 20090716 +#define RUBY_PATCHLEVEL 185 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_TEENY 7 #define RUBY_RELEASE_YEAR 2009 #define RUBY_RELEASE_MONTH 7 -#define RUBY_RELEASE_DAY 15 +#define RUBY_RELEASE_DAY 16 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; Index: ruby_1_8_7/lib/delegate.rb =================================================================== --- ruby_1_8_7/lib/delegate.rb (revision 24135) +++ ruby_1_8_7/lib/delegate.rb (revision 24136) @@ -151,12 +151,12 @@ 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 # @@ -264,11 +264,11 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/