Permalink
Browse files

implement encode_with to squash warnings from psych

  • Loading branch information...
1 parent a318f91 commit ac9c3c9906cb9dae576ba65714950aa0d8ccf6b1 @tenderlove tenderlove committed Jan 19, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/bundler/rubygems_ext.rb
@@ -105,6 +105,12 @@ class Dependency
alias eql? ==
+ def encode_with(coder)
+ to_yaml_properties.each do |ivar|
+ coder[ivar.to_s.sub(/^@/, '')] = instance_variable_get(ivar)
+ end
+ end
+
def to_yaml_properties
instance_variables.reject { |p| ["@source", "@groups"].include?(p.to_s) }
end

0 comments on commit ac9c3c9

Please sign in to comment.