Navigation Menu

Skip to content

Commit

Permalink
merge revision(s) 16369:
Browse files Browse the repository at this point in the history
	* 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
  • Loading branch information
shyouhei committed Jun 15, 2008
1 parent 35af279 commit 81ac0c5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
8 changes: 8 additions & 0 deletions 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
Expand Down
22 changes: 13 additions & 9 deletions lib/delegate.rb
Expand Up @@ -227,13 +227,15 @@ def __setobj__(obj)

# 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

Expand Down Expand Up @@ -280,12 +282,14 @@ def __setobj__(obj) # :nodoc:
@_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
Expand Down
2 changes: 1 addition & 1 deletion version.h
Expand Up @@ -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
Expand Down

0 comments on commit 81ac0c5

Please sign in to comment.