ruby-changes:15478
From: tenderlove <ko1@a...>
Date: Sat, 17 Apr 2010 12:04:13 +0900 (JST)
Subject: [ruby-changes:15478] Ruby:r27378 (trunk): * ext/psych/lib/psych/visitors/yaml_tree.rb (find_ivars): ignore
tenderlove 2010-04-17 12:04:03 +0900 (Sat, 17 Apr 2010) New Revision: 27378 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27378 Log: * ext/psych/lib/psych/visitors/yaml_tree.rb (find_ivars): ignore to_yaml_properties defined by syck. Modified files: trunk/ext/psych/lib/psych/visitors/yaml_tree.rb Index: ext/psych/lib/psych/visitors/yaml_tree.rb =================================================================== --- ext/psych/lib/psych/visitors/yaml_tree.rb (revision 27377) +++ ext/psych/lib/psych/visitors/yaml_tree.rb (revision 27378) @@ -251,10 +251,10 @@ private # FIXME: remove this method once "to_yaml_properties" is removed def find_ivars target - m = target.method(:to_yaml_properties) - unless m.source_location.first.start_with?(Psych::DEPRECATED) + loc = target.method(:to_yaml_properties).source_location.first + unless loc.start_with?(Psych::DEPRECATED) || loc.end_with?('rubytypes.rb') if $VERBOSE - warn "to_yaml_properties is deprecated, please implement \"encode_with(coder)\"" + warn "#{loc}: to_yaml_properties is deprecated, please implement \"encode_with(coder)\"" end return target.to_yaml_properties end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/