Skip to content

Serialises nothing useful when running in a Rails environment #15

@hakanai

Description

@hakanai

When using the gem by itself, everything seems fine:

$ irb
irb(main):001:0> require 'syck'
=> true
irb(main):002:0> Syck::VERSION
=> "1.0.5"
irb(main):003:0> Syck.dump({'a'=>1,'b'=>2})
=> "--- \na: 1\nb: 2\n"
irb(main):004:0> {'a'=>1,'b'=>2}.to_yaml
=> "--- \na: 1\nb: 2\n"

Yet somehow, when running alongside Rails, it serialises nothing other than the hash itself:

$ script/rails console
Loading development environment (Rails 3.2.22.2)
irb(main):001:0> Syck::VERSION
=> "1.0.5"
irb(main):002:0>  Syck.dump({'a'=>1,'b'=>2})
=> "--- {}\n\n"
irb(main):003:0> {'a'=>1,'b'=>2}.to_yaml
=> "--- {}\n\n"

These are both using syck 1.1.0, but the version is reported as 1.0.5 for some reason.

Running actual 1.0.5, everything works fine again, so I guess this is a regression in 1.1.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions