[#44909] VRDdeClientについて — Toshiyasu Soejima <clev@...2.so-net.ne.jp>
#
17 messages
2008/05/11
[#44911] Re: VRDdeClientについて
— yukimi_sake <yukimi_sake@...>
2008/05/11
こんにちは、雪見酒です。
[#44923] Re: VRDdeClientについて
— Takahiro Kambe <taca@...>
2008/05/13
In message <4826942F.4080102@ck2.so-net.ne.jp>
[#44910] SimpleDelegator#dupの引数objについて — "SHIMADA Koji" <snoozer.05@...>
しまだです。
6 messages
2008/05/11
[#44936] yamlとencoding — "Yutaka Kanemoto" <kinpoco@...>
金本と申します。
16 messages
2008/05/14
[#44937] Re: yamlとencoding
— "NARUSE, Yui" <naruse@...>
2008/05/14
成瀬です。
[#44952] Re: yamlとencoding
— "NARUSE, Yui" <naruse@...>
2008/05/17
成瀬です。
[#44997] Re: yamlとencoding
— "Yutaka Kanemoto" <kinpoco@...>
2008/06/03
金本と申します.
[#44942] Gemでhpricotインストールエラー — "Yangkook Kim" <yangkookkim@...>
Kimと申します。
8 messages
2008/05/16
[#44945] Re: Gemでhpricotインストールエラー
— rubikitch@...
2008/05/16
From: "Yangkook Kim" <yangkookkim@gmail.com>
[#44980] 重いタスクと平行にirbを使うと遅い? — "takeru sasaki" <sasaki.takeru@...>
佐々木と申します。
8 messages
2008/05/31
[#44981] Re: 重いタスクと平行にirbを使うと遅い?
— rubikitch@...
2008/05/31
From: "takeru sasaki" <sasaki.takeru@gmail.com>
[#44986] Ruby 1.8.7 has been released — "Akinori MUSHA" <knu@...>
Ruby 1.8.7 をリリースしました。
5 messages
2008/05/31
[ruby-list:44914] Re: SimpleDelegator#dupの引数objについて
From:
Nobuyoshi Nakada <nobu@...>
Date:
2008-05-11 15:50:29 UTC
List:
ruby-list #44914
なかだです。
At Mon, 12 May 2008 00:01:48 +0900,
SHIMADA Koji wrote in [ruby-list:44913]:
> 上記について、ruby-1.8.7-preview2ではまだ上記引数が残ったままですが,
> 次の preview もしくは本リリース時には修正されますでしょうか?
単なるバックポートミスだろうと思います。1.8.6でも直すべきでしょ
う。
また、dup/cloneされたときに元のobjectのほうを置き換えているのも、
1.9のようにコピーされたほうにセットしなおすほうがいいような。と
いうか、initialize_copyを使ってないのはなんででしょう。
Index: lib/delegate.rb
===================================================================
--- lib/delegate.rb (revision 16366)
+++ lib/delegate.rb (working copy)
@@ -228,11 +228,13 @@ 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
@@ -281,10 +283,12 @@ def DelegateClass(superclass)
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
}
--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
中田 伸悦