require'ostruct'describeOpenStructdodescribe'#=='doit'returns true when both are the same'doleft=OpenStruct.new(name: 'Jane')right=OpenStruct.new(name: 'Jane')expect(left).toeql(right)endendend
RESULT ON MRI 2.1.5p273
.
Finished in 0.00141 seconds (files took 0.16863 seconds to load)
1 example, 0 failures
RESULT ON JRUBY 1.7.16 (1.9.3p392)
F
Failures:
1) OpenStruct#== returns true when both are the same
Failure/Error: expect(left).to eql(right)
expected: #<OpenStruct name="Jane">
got: #<OpenStruct name="Jane">
(compared using eql?)
Diff:
# ./open_struct_bug.rb:9:in `(root)'
Finished in 0.024 seconds (files took 1.44 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./open_struct_bug.rb:5 # OpenStruct#== returns true when both are the same
The text was updated successfully, but these errors were encountered:
JRuby 1.8 and 1.9 behavior on JRuby 1.7.x matches both 1.8 and 1.9 modes of MRI. MRI 2.0+ changed the behavior of this and master (JRuby 9000) also matches MRI 2.0+. So not fixing to match MRI version compat...
TEST
RESULT ON MRI 2.1.5p273
RESULT ON JRUBY 1.7.16 (1.9.3p392)
The text was updated successfully, but these errors were encountered: