vestal_versions icon indicating copy to clipboard operation
vestal_versions copied to clipboard

BigDecimal conversion doesn't work with 1.9.2p-180

Open lolow opened this issue 14 years ago • 2 comments

I have just upgrade ruby 1.9.2 to 1.9.2.p180 and I have this error when converting the changes into yaml

TypeError (can't define singleton method "encode_with" for BigDecimal):
  /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/deprecated.rb:16:in `singleton_method_added'
  /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/deprecated.rb:16:in `define_method'
  /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/deprecated.rb:16:in `quick_emit'
  activesupport (3.0.4) lib/active_support/core_ext/big_decimal/conversions.rb:15:in `to_yaml'
  /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:55:in `accept'
  /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:246:in `block in visit_Array'
  /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:246:in `each'
  /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:246:in `visit_Array'
  /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:63:in `accept'
  /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:227:in `block in visit_Hash'
  /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:225:in `each'
  /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:225:in `visit_Hash'
  /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:63:in `accept'
  /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:36:in `

lolow avatar Feb 24 '11 13:02 lolow

Hi,

Could you give me a bit more of a sample of how to reproduce this?

Thanks, Adam

adamcooper avatar Mar 18 '11 04:03 adamcooper

Hi, Sorrry for the delay, here is the workaround: https://github.com/collectiveidea/acts_as_audited/issues/48/#issue/48

lolow avatar Mar 29 '11 07:03 lolow