From 347c554f7ee503f06b59dbe1bd3a6ae818a33efb Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 25 Jul 2012 00:19:09 +0000 Subject: * lib/cgi/html.rb (element_init): suppress redefine warning. Don't define methods if they are already defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/cgi/html.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/cgi/html.rb b/lib/cgi/html.rb index 9b9db93bae..b81ee787e8 100644 --- a/lib/cgi/html.rb +++ b/lib/cgi/html.rb @@ -845,6 +845,7 @@ class CGI # Initialise the HTML generation methods for this version. def element_init extend TagMaker + return if defined?(html) methods = "" # - - for element in %w[ A TT I B U STRIKE BIG SMALL SUB SUP EM STRONG @@ -895,6 +896,7 @@ class CGI # Initialise the HTML generation methods for this version. def element_init extend TagMaker + return if defined?(html) methods = "" # - - for element in %w[ TT I B BIG SMALL EM STRONG DFN CODE SAMP KBD @@ -944,6 +946,7 @@ class CGI # Initialise the HTML generation methods for this version. def element_init extend TagMaker + return if defined?(html) methods = "" # - - for element in %w[ TT I B U S STRIKE BIG SMALL EM STRONG DFN @@ -994,6 +997,7 @@ class CGI # Initialise the HTML generation methods for this version. def element_init + return if defined?(frameset) methods = "" # - - for element in %w[ FRAMESET ] -- cgit v1.2.3