Skip to content

Commit e545aa3

Browse files
committed
REXML::DocType: remove needless quote strip
Because parser already strips quotes.
1 parent 58f2202 commit e545aa3

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

lib/rexml/doctype.rb

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def public
161161
when "SYSTEM"
162162
nil
163163
when "PUBLIC"
164-
strip_quotes(@long_name)
164+
@long_name
165165
end
166166
end
167167

@@ -171,9 +171,9 @@ def public
171171
def system
172172
case @external_id
173173
when "SYSTEM"
174-
strip_quotes(@long_name)
174+
@long_name
175175
when "PUBLIC"
176-
@uri.kind_of?(String) ? strip_quotes(@uri) : nil
176+
@uri.kind_of?(String) ? @uri : nil
177177
end
178178
end
179179

@@ -195,15 +195,6 @@ def notation(name)
195195
notation_decl.name == name
196196
}
197197
end
198-
199-
private
200-
201-
# Method contributed by Henrik Martensson
202-
def strip_quotes(quoted_string)
203-
quoted_string =~ /^[\'\"].*[\'\"]$/ ?
204-
quoted_string[1, quoted_string.length-2] :
205-
quoted_string
206-
end
207198
end
208199

209200
# We don't really handle any of these since we're not a validating

0 commit comments

Comments
 (0)