Hello I'm trying to learn ruby, and I have a question, how can I restore
a file marshall. That is to say retrieve the original file. Thank you in
advance, ruby is the first programming laguage I try to 'learn, so
please give me a clear answer . I'm French sorry for my bad english
In this example "x" is just a sample value - could be any object.
Kind regards
rober
···
On Wed, Oct 30, 2013 at 4:11 PM, Chuck N. <lists@ruby-forum.com> wrote:
Hello I'm trying to learn ruby, and I have a question, how can I restore
a file marshall. That is to say retrieve the original file. Thank you in
advance, ruby is the first programming laguage I try to 'learn, so
please give me a clear answer . I'm French sorry for my bad english
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?
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"
···
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?