ruby-changes:20911
From: tenderlove <ko1@a...>
Date: Sat, 13 Aug 2011 09:27:54 +0900 (JST)
Subject: [ruby-changes:20911] tenderlove:r32960 (trunk): * ext/psych/lib/psych/core_ext.rb: Make Kernel#y private.
tenderlove 2011-08-13 09:27:44 +0900 (Sat, 13 Aug 2011) New Revision: 32960 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32960 Log: * ext/psych/lib/psych/core_ext.rb: Make Kernel#y private. [ruby-core:38913] * test/psych/test_yaml.rb: corresponding test. Modified files: trunk/ChangeLog trunk/ext/psych/lib/psych/core_ext.rb trunk/test/psych/test_yaml.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 32959) +++ ChangeLog (revision 32960) @@ -1,3 +1,9 @@ +Sat Aug 13 09:26:24 2011 Aaron Patterson <aaron@t...> + + * ext/psych/lib/psych/core_ext.rb: Make Kernel#y private. + [ruby-core:38913] + * test/psych/test_yaml.rb: corresponding test. + Sat Aug 13 09:05:16 2011 Tadayoshi Funaba <tadf@d...> * ext/date/date_core.c (date_strftime_alloc): followed the change Index: ext/psych/lib/psych/core_ext.rb =================================================================== --- ext/psych/lib/psych/core_ext.rb (revision 32959) +++ ext/psych/lib/psych/core_ext.rb (revision 32960) @@ -36,4 +36,5 @@ end remove_method :y rescue nil alias y psych_y + private :y end Index: test/psych/test_yaml.rb =================================================================== --- test/psych/test_yaml.rb (revision 32959) +++ test/psych/test_yaml.rb (revision 32960) @@ -3,6 +3,7 @@ # $Id$ # require 'psych/helper' +require 'ostruct' # [ruby-core:01946] module Psych_Tests @@ -14,6 +15,12 @@ Psych.domain_types.clear end + def test_y_method + assert_raises(NoMethodError) do + OpenStruct.new.y 1 + end + end + def test_syck_compat time = Time.utc(2010, 10, 10) yaml = Psych.dump time -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/