Skip to content

Instantly share code, notes, and snippets.

@r38y
Created November 26, 2011 23:04
Show Gist options
  • Save r38y/1396460 to your computer and use it in GitHub Desktop.
Save r38y/1396460 to your computer and use it in GitHub Desktop.
It is deserializing "object: !ruby/object:Class Time" as Class instead of Time. I'm not sure if it is a serialization or deserialization error.
# Production
irb(main):016:0> YAML::ENGINE.yamler = 'syck'=> "syck"
irb(main):017:0> Delayed::PerformableMethod.new(Time, :now, {}).to_yaml
=> "--- !ruby/struct:Delayed::PerformableMethod \nobject: !ruby/object:Class Time\nmethod_name: :now\nargs: {}\n\n"
# Development
ruby-1.9.2-p290 :005 > YAML::ENGINE.yamler = 'syck'
=> "syck"
ruby-1.9.2-p290 :006 > Delayed::PerformableMethod.new(Time, :now, {}).to_yaml
=> "--- !ruby/struct:Delayed::PerformableMethod {object: !ruby/class Time, method_name: :now, args: {}}\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment