=begin
This issue was solved with changeset r26007.
Guillaume, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=begin
This issue was solved with changeset r26163.
Guillaume, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=begin
Fixed also in 1.8 with r26164. This particular example worked in 1.8 because DelegateClass does not return a subclass of Delegator in 1.8, but the same bug existed for SimpleDelegator, for example.
At Thu, 24 Dec 2009 13:14:43 +0900,
Marc-Andre Lafortune wrote in [ruby-core:27306]:
Fixed also in 1.8 with r26164. This particular example worked
in 1.8 because DelegateClass does not return a subclass of
Delegator in 1.8, but the same bug existed for
SimpleDelegator, for example.
Also added basic RubySpec for this.
This change has broken marshal format comatibility.
$ cat d.rb
require 'delegate'
class A < DelegateClass(Array)
end
=begin
On Sun, Dec 27, 2009 at 8:19 PM, Nobuyoshi Nakada nobu@ruby-lang.org wrote:
This change has broken marshal format comatibility.
Indeed.
I can't think of a way to make it backward compatible, but for forward compatibility, how about the following?
diff --git a/lib/delegate.rb b/lib/delegate.rb
index f8a71f1..1516dac 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -184,16 +184,21 @@ class Delegator
# Serialization support for the object returned by __getobj__.
def marshal_dump
[
=begin
This issue was solved with changeset r26195.
Guillaume, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.