rubyspec/rubyspec — pull request #265 by DavidEGrayson (2013-12-21 05:41:07+00:00)
Title: Fixed the 'loads an array having an ivar' spec for Marshal.load

In Ruby, `Array#==` and `String#==` just look at the main values of the objects and don't look at their instance variables.

Here is an IRB session in MRI 2.0.0p247 demonstrating this:

```
irb(main):001:0> RUBY_VERSION
=> "2.0.0"
irb(main):002:0> s = "a"; s.instance_variable_set(:@foo, 10)
=> 10
irb(main):003:0> s == "a"
=> true
irb(main):004:0> a = []; a.instance_variable_set(:@foo, 10)
=> 10
irb(main):005:0> a == []
=> true
```

Therefore, one of the tests in core/marshal/shared/load.rb was not actually testing for the existence of instance variables in the unmarshaled object, but it seems like it should be. This pull request fixes that issue so that the test now actually tests those instance variables.