Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
diff --git a/spec/ruby/1.8/core/marshal/fixtures/marshal_data.rb b/spec/ruby/1.8/core/marshal/fixtures/marshal_data.rb index d0a9e0b..f427f75 100644 --- a/spec/ruby/1.8/core/marshal/fixtures/marshal_data.rb +++ b/spec/ruby/1.8/core/marshal/fixtures/marshal_data.rb @@ -234,3 +234,7 @@ module MarshalSpec } end +class MarshallSingleton + require 'singleton' + include Singleton +end diff --git a/spec/ruby/1.8/core/marshal/load_spec.rb b/spec/ruby/1.8/core/marshal/load_spec.rb index aaa18e1..737c98c 100644 --- a/spec/ruby/1.8/core/marshal/load_spec.rb +++ b/spec/ruby/1.8/core/marshal/load_spec.rb @@ -225,4 +225,12 @@ describe "Marshal::load" do Marshal.load(marshal).should == object end end + + ruby_bug do + # http://rubyforge.org/tracker/index.php?func=detail&aid=19377&group_id=426&atid=1698 + it "should return the sole instance of a class with Singleton included" do + instance = MarshalSingleton.instance + instance.equal?(Marshal.load(Marshal.dump(instance))).should == true + end + end end
This paste will be private.
From the Design Piracy series on my blog: