Project

General

Profile

Actions

Bug #7564

closed

r38175 introduces incompatibility

Added by tenderlovemaking (Aaron Patterson) about 12 years ago. Updated almost 12 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 2.0.0dev (2012-12-15 trunk 38381) [x86_64-darwin12.2.1]
Backport:
[ruby-core:50900]

Description

r38175 introduces incompatibility with 1.9.3. Before r38175, when looking for _dump, Marshal would not call method_missing. Now marshal calls method_missing when trying to dump.

The following example exits with no error on 1.9.3, but on trunk it raises an exception (_dump() must return string (TypeError)):

class TR
def initialize calls = []
@calls = calls
end

def method_missing name, *args
@calls << [name, args]
end
end

Marshal.dump TR.new

I've attached a test case.


Files

bug.patch (675 Bytes) bug.patch tenderlovemaking (Aaron Patterson), 12/15/2012 03:02 AM

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #7638: trunk で rails の activesupport のテストが失敗してしまうClosednobu (Nobuyoshi Nakada)12/30/2012Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0