From f6327e732fbc8c68dae163401d283924769dee8d Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 23 Jul 2012 21:37:39 +0000 Subject: Suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rss/test_atom.rb | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'test/rss/test_atom.rb') diff --git a/test/rss/test_atom.rb b/test/rss/test_atom.rb index 80da69bd94..e0ae108698 100644 --- a/test/rss/test_atom.rb +++ b/test/rss/test_atom.rb @@ -453,11 +453,13 @@ module RSS def assert_atom_link_to_s(target_class) _wrap_assertion do href = "http://example.com/atom.xml" - rel = "self" - type = "application/atom+xml" - hreflang = "ja" - title = "Atom Feed" - length = "801" + optvs = { + 'rel' => "self", + 'type' => "application/atom+xml", + 'hreflang' => "ja", + 'title' => "Atom Feed", + 'length' => "801", + } link = target_class.new assert_equal("", link.to_s) @@ -472,24 +474,24 @@ module RSS rest = optional_arguments.reject {|x| x == name} link = target_class.new - link.__send__("#{name}=", eval(name)) + link.__send__("#{name}=", optvs[name]) assert_equal("", link.to_s) rest.each do |n| - link.__send__("#{n}=", eval(n)) + link.__send__("#{n}=", optvs[n]) assert_equal("", link.to_s) end link = target_class.new link.href = href - link.__send__("#{name}=", eval(name)) - attrs = [["href", href], [name, eval(name)]] + link.__send__("#{name}=", optvs[name]) + attrs = [["href", href], [name, optvs[name]]] xml = REXML::Document.new(link.to_s).root assert_rexml_element([], attrs, nil, xml) rest.each do |n| - link.__send__("#{n}=", eval(n)) - attrs << [n, eval(n)] + link.__send__("#{n}=", optvs[n]) + attrs << [n, optvs[n]] xml = REXML::Document.new(link.to_s).root assert_rexml_element([], attrs, nil, xml) end -- cgit v1.2.3