Permalink
Browse files

Mail::Message#to_yaml: Convert instance_variables output to symbols f…

…or 1.8.7 compatibility
  • Loading branch information...
1 parent 2c63462 commit c0e74a9dee6c964a93a2bd7734b4b8cb68384f9c @urbanautomaton urbanautomaton committed May 24, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/mail/message.rb
View
2 lib/mail/message.rb
@@ -1720,7 +1720,7 @@ def to_yaml(opts = {})
hash['delivery_handler'] = delivery_handler.to_s if delivery_handler
hash['transport_encoding'] = transport_encoding.to_s
special_variables = [:@header, :@delivery_handler, :@transport_encoding]
- (instance_variables - special_variables).each do |var|
+ (instance_variables.map(&:to_sym) - special_variables).each do |var|
hash[var.to_s] = instance_variable_get(var)
end
hash.to_yaml(opts)

0 comments on commit c0e74a9

Please sign in to comment.