summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-16 00:35:14 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-16 00:35:14 +0000
commit4156653bc05e54b2f779a7aa4ba354d957914238 (patch)
tree9c7c96afd7626cc1cc2d8f9b68908be95cb475d9
parente3ba58bb2c6918fd810ecb2839b020ae7131fa39 (diff)
merge revision(s) 23380:
* lib/delegate.rb (Delegator#method_missing) (DelegateClass()#method_missing): Properly pass a given block through. [ruby-dev:38390] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/delegate.rb12
-rw-r--r--version.h8
3 files changed, 16 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 83530a434b..22674de35e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Jul 16 09:35:06 2009 Akinori MUSHA <knu@iDaemons.org>
+
+ * 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@ruby-lang.org>
* file.c (rb_file_join): recursive array has no meaning as path
diff --git a/lib/delegate.rb b/lib/delegate.rb
index bd2b5e4813..43549946c9 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -151,12 +151,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
#
@@ -264,11 +264,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
diff --git a/version.h b/version.h
index 222fc50f2b..d41d89be3b 100644
--- a/version.h
+++ b/version.h
@@ -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[];