Actions
Bug #541
closedcgi.rb : obsolete regex "n" option
Bug #541:
cgi.rb : obsolete regex "n" option
Description
=begin
CGI::prettyの正規表現部分にnが使われているので
warningが出ます。
Index: lib/cgi.rb¶
--- lib/cgi.rb (リビジョン 19071)
+++ lib/cgi.rb (作業コピー)
@@ -1245,14 +1245,14 @@
# #
#
def CGI::pretty(string, shift = " ")
- lines = string.gsub(/(?!\A)<(?:.|\n)?>/n, "\n\0").gsub(/<(?:.|\n)?>(?!\n)/n, "\0\n")
- lines = string.gsub(/(?!\A)<(?:.|\n)?>/, "\n\0").gsub(/<(?:.|\n)?>(?!\n)/, "\0\n")
end_pos = 0
- while end_pos = lines.index(/^</(\w+)/n, end_pos)
- while end_pos = lines.index(/^</(\w+)/, end_pos)
element = $1.dup
- end
- lines.gsub(/^((?:#{Regexp::quote(shift)})*)__(?=</?\w)/n, '\1')
- lines.gsub(/^((?:#{Regexp::quote(shift)})*)__(?=</?\w)/, '\1')
end
=end
Updated by ko1 (Koichi Sasada) about 18 years ago
- Assignee set to xibbar (Takeyuki FUJIOKA)
=begin
=end
Updated by xibbar (Takeyuki FUJIOKA) about 18 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
Applied in changeset r19245.
=end
Actions