summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 13:48:10 (GMT)
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 13:48:10 (GMT)
commit81ac0c5711773028f0901f06ac71eded2cf2f2a9 (patch)
tree6bdccb3a19b55e76da50861a8ae8e884b6eca404
parent35af279cee18c484950ee2c8200c58a979857c21 (diff)
merge revision(s) 16369:
* lib/delegate.rb (SimpleDelegator::dup): removed needless argument. [ruby-list:44910] * lib/delegate.rb (clone, dup): keep relationship with the target object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@17284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--lib/delegate.rb22
-rw-r--r--version.h2
3 files changed, 22 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 7508d9e..9a65925 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sun Jun 15 22:47:37 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/delegate.rb (SimpleDelegator::dup): removed needless argument.
+ [ruby-list:44910]
+
+ * lib/delegate.rb (clone, dup): keep relationship with the target
+ object.
+
Sun Jun 15 22:45:19 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* util.c (ruby_strtod): backported from 1.9. a patch from Satoshi
diff --git a/lib/delegate.rb b/lib/delegate.rb
index 93c9803..30b4edc 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -227,13 +227,15 @@ class SimpleDelegator<Delegator
# Clone support for the object returned by \_\_getobj\_\_.
def clone
- super
- __setobj__(__getobj__.clone)
+ new = super
+ new.__setobj__(__getobj__.clone)
+ new
end
# Duplication support for the object returned by \_\_getobj\_\_.
- def dup(obj)
- super
- __setobj__(__getobj__.dup)
+ def dup
+ new = super
+ new.__setobj__(__getobj__.clone)
+ new
end
end
@@ -280,12 +282,14 @@ def DelegateClass(superclass)
@_dc_obj = obj
end
def clone # :nodoc:
- super
- __setobj__(__getobj__.clone)
+ new = super
+ new.__setobj__(__getobj__.clone)
+ new
end
def dup # :nodoc:
- super
- __setobj__(__getobj__.dup)
+ new = super
+ new.__setobj__(__getobj__.clone)
+ new
end
}
for method in methods
diff --git a/version.h b/version.h
index 1db5a05..fb272fa 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-15"
#define RUBY_VERSION_CODE 185
#define RUBY_RELEASE_CODE 20080615
-#define RUBY_PATCHLEVEL 204
+#define RUBY_PATCHLEVEL 205
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8