ruby-changes:31134
From: nobu <ko1@a...>
Date: Wed, 9 Oct 2013 17:45:34 +0900 (JST)
Subject: [ruby-changes:31134] nobu:r43213 (trunk): test_inadvertent_creation.rb: use assert_not_interned?
nobu 2013-10-09 17:45:30 +0900 (Wed, 09 Oct 2013) New Revision: 43213 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43213 Log: test_inadvertent_creation.rb: use assert_not_interned? * test/-ext-/symbol/test_inadvertent_creation.rb: use assert_not_interned? instead assert_not_send. Modified files: trunk/test/-ext-/symbol/test_inadvertent_creation.rb Index: test/-ext-/symbol/test_inadvertent_creation.rb =================================================================== --- test/-ext-/symbol/test_inadvertent_creation.rb (revision 43212) +++ test/-ext-/symbol/test_inadvertent_creation.rb (revision 43213) @@ -139,7 +139,7 @@ module Test_Symbol https://github.com/ruby/ruby/blob/trunk/test/-ext-/symbol/test_inadvertent_creation.rb#L139 def test_public_send name = noninterned_name e = assert_raise(NoMethodError) {@obj.public_send(name, Feature5112)} - assert_not_send([Bug::Symbol, :interned?, name]) + assert_not_interned?(name) assert_equal(name, e.name) assert_equal([Feature5112], e.args) end @@ -147,7 +147,7 @@ module Test_Symbol https://github.com/ruby/ruby/blob/trunk/test/-ext-/symbol/test_inadvertent_creation.rb#L147 def test_send name = noninterned_name e = assert_raise(NoMethodError) {@obj.send(name, Feature5112)} - assert_not_send([Bug::Symbol, :interned?, name]) + assert_not_interned?(name) assert_equal(name, e.name) assert_equal([Feature5112], e.args) end @@ -155,7 +155,7 @@ module Test_Symbol https://github.com/ruby/ruby/blob/trunk/test/-ext-/symbol/test_inadvertent_creation.rb#L155 def test___send__ name = noninterned_name e = assert_raise(NoMethodError) {@obj.__send__(name, Feature5112)} - assert_not_send([Bug::Symbol, :interned?, name]) + assert_not_interned?(name) assert_equal(name, e.name) assert_equal([Feature5112], e.args) end @@ -164,75 +164,75 @@ module Test_Symbol https://github.com/ruby/ruby/blob/trunk/test/-ext-/symbol/test_inadvertent_creation.rb#L164 Thread.current[:test] = nil name = noninterned_name assert_nil(Thread.current[name]) - assert_not_send([Bug::Symbol, :interned?, name]) + assert_not_interned?(name) end def test_thread_key? Thread.current[:test] = nil name = noninterned_name assert_not_send([Thread.current, :key?, name]) - assert_not_send([Bug::Symbol, :interned?, name]) + assert_not_interned?(name) end def test_thread_variable_get Thread.current.thread_variable_set(:test, nil) name = noninterned_name assert_nil(Thread.current.thread_variable_get(name)) - assert_not_send([Bug::Symbol, :interned?, name]) + assert_not_interned?(name) end def test_thread_variable? Thread.current.thread_variable_set(:test, nil) name = noninterned_name assert_not_send([Thread.current, :thread_variable?, name]) - assert_not_send([Bug::Symbol, :interned?, name]) + assert_not_interned?(name) end def test_enumerable_inject_op name = noninterned_name assert_raise(NoMethodError) {[1, 2].inject(name)} - assert_not_send([Bug::Symbol, :interned?, name]) + assert_not_interned?(name) end def test_module_const_set name = noninterned_name mod = Module.new assert_raise(NameError) {mod.const_set(name, true)} - assert_not_send([Bug::Symbol, :interned?, name]) + assert_not_interned?(name) end def test_module_cvar_set name = noninterned_name mod = Module.new assert_raise(NameError) {mod.class_variable_set(name, true)} - assert_not_send([Bug::Symbol, :interned?, name]) + assert_not_interned?(name) end def test_object_ivar_set name = noninterned_name obj = Object.new assert_raise(NameError) {obj.instance_variable_set(name, true)} - assert_not_send([Bug::Symbol, :interned?, name]) + assert_not_interned?(name) end def test_struct_new name = noninterned_name assert_raise(NameError) {Struct.new(name)} - assert_not_send([Bug::Symbol, :interned?, name]) + assert_not_interned?(name) end def test_struct_aref s = Struct.new(:foo).new name = noninterned_name assert_raise(NameError) {s[name]} - assert_not_send([Bug::Symbol, :interned?, name]) + assert_not_interned?(name) end def test_struct_aset s = Struct.new(:foo).new name = noninterned_name assert_raise(NameError) {s[name] = true} - assert_not_send([Bug::Symbol, :interned?, name]) + assert_not_interned?(name) end end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/