override :method method breaks Psych
I am not sure if this could be considered a bug, but it used to work.
To reproduce it:
ruby -r psych -v -e 'Psych.dump(Struct.new(:method).new)'
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.5.0]
method': wrong number of arguments(1 for 0) (ArgumentError)accept'
from -e:1:in `'
I don't have a good idea how to fix it,
but here's some demonstration:
Patches attached as well, the same as above two commits.
I think they are against r30885.
p.s. this issue was found in delayed_job's:
class PerformableMethod < Struct.new(:object, :method, :args)