Skip to content

Commit 09a7d01

Browse files
author
wyhaines
committed
lib/delegate.rb: Backport ruby#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
1 parent 0881fce commit 09a7d01

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

ChangeLog

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
Thu Jun 10 01:40:00 Kirk Haines <khaines@ruby-lang.org>
2+
3+
* lib/delegate.rb: Backport #1781 [ruby-core:24356]; allow a block to be properly passed through.
4+
15
Wed Jun 9 04:35:00 Kirk Haines <khaines@ruby-lang.org>
26

3-
* gc.c: Backport #1785 [ruby-core:24395]; check to make sure finalizer_table isn't null before trying to run finalizers.
7+
* gc.c: Backport #1785 [ruby-core:24395]; check to make sure finalizer_table isn't null before trying to run finalizers. r28235
48

59
Wed Jun 9 02:10:00 Kirk Haines <khaines@ruby-lang.org>
610

lib/delegate.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@ def self.#{method}(*args, &block)
152152
alias initialize_methods initialize
153153

154154
# Handles the magic of delegation through \_\_getobj\_\_.
155-
def method_missing(m, *args)
155+
def method_missing(m, *args, &block)
156156
target = self.__getobj__
157157
unless target.respond_to?(m)
158-
super(m, *args)
158+
super(m, *args, &block)
159159
end
160-
target.__send__(m, *args)
160+
target.__send__(m, *args, &block)
161161
end
162162

163163
#
@@ -265,11 +265,11 @@ def DelegateClass(superclass)
265265
def initialize(obj) # :nodoc:
266266
@_dc_obj = obj
267267
end
268-
def method_missing(m, *args) # :nodoc:
268+
def method_missing(m, *args, &block) # :nodoc:
269269
unless @_dc_obj.respond_to?(m)
270-
super(m, *args)
270+
super(m, *args, &block)
271271
end
272-
@_dc_obj.__send__(m, *args)
272+
@_dc_obj.__send__(m, *args, &block)
273273
end
274274
def respond_to?(m, include_private = false) # :nodoc:
275275
return true if super

version.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#define RUBY_VERSION "1.8.6"
2-
#define RUBY_RELEASE_DATE "2010-06-09"
2+
#define RUBY_RELEASE_DATE "2010-06-10"
33
#define RUBY_VERSION_CODE 186
4-
#define RUBY_RELEASE_CODE 20100609
5-
#define RUBY_PATCHLEVEL 411
4+
#define RUBY_RELEASE_CODE 20100610
5+
#define RUBY_PATCHLEVEL 412
66

77
#define RUBY_VERSION_MAJOR 1
88
#define RUBY_VERSION_MINOR 8
99
#define RUBY_VERSION_TEENY 6
1010
#define RUBY_RELEASE_YEAR 2010
1111
#define RUBY_RELEASE_MONTH 6
12-
#define RUBY_RELEASE_DAY 9
12+
#define RUBY_RELEASE_DAY 10
1313

1414
#ifdef RUBY_EXTERN
1515
RUBY_EXTERN const char ruby_version[];

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy