Syck dies on multiline regex

Discussion in 'Ruby' started by Josh Cheek, Jun 13, 2011.

  1. Josh Cheek

    Josh Cheek Guest

    [Note: parts of this message were removed to make it a legal post.]

    require 'yaml'
    [YAML, Marshal].each do |serializer|
    [/ab/x, /a
    b/x].each do |regex|
    begin
    serializer.load(serializer.dump regex)
    rescue
    p $!
    end
    end
    end

    # >> #<Syck::TypeError: Invalid Regular expression: "/a\n b/x">



    This, in tandem with a few other things, cost me about four hours today (and
    made me reconsider my decision to become a nonsmoker -.-).

    Is this a bug? If so, where should I report it?
     
    Josh Cheek, Jun 13, 2011
    #1
    1. Advertising

  2. Josh Cheek

    Ryan Davis Guest

    On Jun 13, 2011, at 12:34 , Josh Cheek wrote:

    > require 'yaml'
    > [YAML, Marshal].each do |serializer|
    > [/ab/x, /a
    > b/x].each do |regex|
    > begin
    > serializer.load(serializer.dump regex)
    > rescue
    > p $!
    > end
    > end
    > end
    >=20
    > # >> #<Syck::TypeError: Invalid Regular expression: "/a\n =

    b/x">
    >=20
    >=20
    >=20
    > This, in tandem with a few other things, cost me about four hours =

    today (and
    > made me reconsider my decision to become a nonsmoker -.-).
    >=20
    > Is this a bug? If so, where should I report it?


    It is probably a bug. It _probably_ won't ever get fixed as nobody =
    really maintains syck anymore (tho if you come up with a patch, that'd =
    certainly help). Try psych if it is possible:

    6371 % ruby19 -rpsych -ryaml -e 'p YAML.dump /a
    b/x'
    "--- !ruby/regexp \"/a\\n b/x\"\n"
     
    Ryan Davis, Jun 13, 2011
    #2
    1. Advertising

  3. Josh Cheek

    Guest

    On Mon, Jun 13, 2011 at 3:34 PM, Josh Cheek <> wrote:
    > # >> #<Syck::TypeError: Invalid Regular expression: "/a\n =A0 =A0 =A0 =A0=

    =A0 b/x">
    >
    > Is this a bug?


    Probably.

    > If so, where should I report it?


    http://redmine.ruby-lang.org/

    Though, as noted, syck is not maintained and psych appears to be the future=
     
    , Jun 14, 2011
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jane Austine

    Syck (yaml) for win32?

    Jane Austine, Dec 8, 2004, in forum: Python
    Replies:
    0
    Views:
    431
    Jane Austine
    Dec 8, 2004
  2. Replies:
    3
    Views:
    798
    Reedick, Andrew
    Jul 1, 2008
  3. Bermejo, Rodrigo (GEAE, Foreign National)

    syck compiling error on HPUX - aCC

    Bermejo, Rodrigo (GEAE, Foreign National), Aug 16, 2003, in forum: Ruby
    Replies:
    1
    Views:
    119
    Bermejo, Rodrigo
    Aug 18, 2003
  4. Christopher M. Lusardi
    Replies:
    3
    Views:
    203
    Alan J. Flavell
    Oct 19, 2003
  5. dale zhang
    Replies:
    8
    Views:
    440
    Tintin
    Nov 30, 2004
Loading...

Share This Page