diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-25 00:19:09 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-25 00:19:09 +0000 |
commit | 347c554f7ee503f06b59dbe1bd3a6ae818a33efb (patch) | |
tree | ed9217d7d811bec95407bb6e8511ee686faeac9d /lib/cgi/html.rb | |
parent | ead728ca7d7a42a3c1658d00102732947b514dea (diff) | |
download | ruby-347c554f7ee503f06b59dbe1bd3a6ae818a33efb.tar.gz |
* 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
Diffstat (limited to 'lib/cgi/html.rb')
-rw-r--r-- | lib/cgi/html.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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 ] |