I just upgraded my ruby 1.9 to the latest stable version (ruby 1.9.1-p243),
and now I'm facing a strange issue. The problem is that attempting to use
Marshal to dump and then load back an array containing two Regexps gives an
error. For example:
str = Marshal.dump [/a/, /b/]
Marshal.load str
This gives the following error:
/home/stefano/documents/scripts/prova.rb:4:in `load': can't convert Regexp
into String (TypeError)
from /home/stefano/documents/scripts/prova.rb:4:in `<main>'
The above code worked perfectly with the previous version of ruby 1.9.1. Has
anybody noticed the same issue?
Thanks in advance
Stefano
Hi Stefano,
I get the same error you do with ruby 1.9.1-p243. This code works
fine with 1.8.6.
Sorry that I don't know what might be causing this problem.
HTH,
Wayne
···
On Wed, Sep 16, 2009 at 2:09 AM, Stefano Crocco <stefano.crocco@alice.it> wrote:
I just upgraded my ruby 1.9 to the latest stable version (ruby 1.9.1-p243),
str = Marshal.dump [/a/, /b/]
Marshal.load str
This gives the following error:
/home/stefano/documents/scripts/prova.rb:4:in `load': can't convert Regexp
---
Wayne Vucenic
No Bugs Software
Agile Ruby (preferably not Rails), Erlang, C# contract programming on
Vista, Linux, OS X in Silicon Valley
Since I'm not the only one to experience this issue, I'll report it as a bug.
Thanks
Stefano
···
On Wednesday 16 September 2009, Wayne Vucenic wrote:
>On Wed, Sep 16, 2009 at 2:09 AM, Stefano Crocco <stefano.crocco@alice.it> wrote:
>> I just upgraded my ruby 1.9 to the latest stable version (ruby
>> 1.9.1-p243),
>>
>> str = Marshal.dump [/a/, /b/]
>> Marshal.load str
>>
>> This gives the following error:
>> /home/stefano/documents/scripts/prova.rb:4:in `load': can't convert
>> Regexp
>
>Hi Stefano,
>
>I get the same error you do with ruby 1.9.1-p243. This code works
>fine with 1.8.6.
>
>Sorry that I don't know what might be causing this problem.
>
>HTH,
>
>Wayne
>