Project

General

Profile

Actions

Bug #7722

closed

[rubyspec] failure in core/marshal/dump_spec.rb

Added by nobu (Nobuyoshi Nakada) almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Target version:
ruby -v:
r38118 and later
Backport:
[ruby-core:51560]

Description

=begin
Since r38118, (({test-rubyspect})) fails in ((%rubyspec/core/marshal/dump_spec.rb%)).

  • Before r38117
    $ export MSPECOPT='-e "Marshal.dump with an Object dumps a BasicObject subclass if it defines respond_to?" core/marshal/dump_spec.rb'
    $ make test-rubyspec
    ./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems ./spec/mspec/bin/mspec run -B ./spec/default.mspec -e "Marshal.dump with an Object dumps a BasicObject subclass if it defines respond_to?" core/marshal/dump_spec.rb
    ruby 2.0.0dev (2012-12-01 trunk 38117) [x86_64-darwin11.4.2]
    .

    Finished in 0.045351 seconds

    1 file, 1 example, 1 expectation, 0 failures, 0 errors

  • After r38117
    $ make test-rubyspec
    ./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems ./spec/mspec/bin/mspec run -B ./spec/default.mspec -e "Marshal.dump with an Object dumps a BasicObject subclass if it defines respond_to?" core/marshal/dump_spec.rb
    ruby 2.0.0dev (2012-12-01 trunk 38118) [x86_64-darwin11.4.2]
    E

    Marshal.dump with an Object dumps a BasicObject subclass if it defines respond_to? ERROR
    ArgumentError: wrong number of arguments (2 for 1)
    /tmp/ruby/trunk/feature-6539/spec/rubyspec/core/marshal/fixtures/marshal_data.rb:158:in respond_to?' /tmp/ruby/trunk/feature-6539/spec/rubyspec/core/marshal/dump_spec.rb:397:in dump'
    /tmp/ruby/trunk/feature-6539/spec/rubyspec/core/marshal/dump_spec.rb:397:in block (4 levels) in <top (required)>' /tmp/ruby/trunk/feature-6539/spec/rubyspec/core/marshal/dump_spec.rb:5:in <top (required)>'

    Finished in 0.045077 seconds

    1 file, 1 example, 0 expectations, 0 failures, 1 error
    make: *** [test-rubyspec] Error 1

r38118 changes to call (({respond_to?})) method with ((|include_all|)) as (({true})), so
that private methods can be found, cf. [Feature #6539]

The choces what I can thought out are:

(1) change RubySpect to take the flag as a rest argument
(2) reject [Feature #6539]
(3) call respond_to? according to its arity

Attach the patches for (3).
=end


Files

0001-vm_method.c-drop-include_all-flag.patch (1.51 KB) 0001-vm_method.c-drop-include_all-flag.patch vm_method.c: drop include_all flag nobu (Nobuyoshi Nakada), 01/22/2013 04:29 PM
0002-proc.c-original-arity.patch (1.79 KB) 0002-proc.c-original-arity.patch proc.c: original arity nobu (Nobuyoshi Nakada), 01/22/2013 04:29 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0