On 10/30/2013 09:00 AM, Joel Pearson wrote:
> I tried using Marshal with my RubyExcel gem in IRB, and I got these
> warnings:
>
> (irb):6: warning: RubyExcel::Sheet#respond_to?(:marshal_dump) is old
> fashion which takes only one parameter
> C:/splice/bin/RubyExcel/lib/lib/rubyexcel/sheet.rb:430: warning:
> respond_to? is defined here
>
> My Google search didn't turn up anything particularly relevant. Is this
> warning part of IRB, Marshal... Ruby interpreter?
>

It's a warning from Ruby:

https://github.com/ruby/ruby/blob/fb3bd5a18a335b0f318bf30d246403caeabf344b/vm_method.c#L1582

Change is here: 
https://github.com/ruby/ruby/commit/a106b310e5bbe678022b127b9d32bb0a55708002

Marshal calls rb_respond_to() which calls rb_obj_respond_to() which 
issues that warning if an object's respond_to? method doesn't accept an 
optional second argument:

$ irb
2.0.0p247 :001 > class A
2.0.0p247 :002?>   def respond_to? meth
2.0.0p247 :003?>     end
2.0.0p247 :004?>   end
  => nil
2.0.0p247 :005 > Marshal.dump(A.new)
(irb):5: warning: A#respond_to?(:marshal_dump) is old fashion which 
takes only one parameter
(irb):2: warning: respond_to? is defined here
(irb):5: warning: A#respond_to?(:_dump) is old fashion which takes only 
one parameter
(irb):2: warning: respond_to? is defined here
  => "\x04\bo:\x06A\x00"