Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

implement encode_with to squash warnings from psych

  • Loading branch information...
commit ac9c3c9906cb9dae576ba65714950aa0d8ccf6b1 1 parent a318f91
@tenderlove tenderlove authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/bundler/rubygems_ext.rb
View
6 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
Please sign in to comment.
Something went wrong with that request. Please try again.