aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rexml
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert r37439 and r37441kou2012-11-031-4/+7
| | | | | | | | | | | | | | | | | r37439: * lib/rexml/xmldecl.rb (REXML::XMLDecl): Stop using REXML::Encoding module because XMLDecl doesn't convert encoding. This causes removing XML encoding name normalization (encoding.upcase). Encoding name in XML declaration is what user specifies. I think this is reasonable change. * test/rexml/test_xml_declaration.rb: Add tests for the above change. r37441: * test/rexml/test_core.rb (Tester#test_ticket_88): Follow the change that encoding name in XML declaration isn't normalized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/document.rb (REXML::Document#write): Document encodingkou2012-11-032-7/+7
| | | | | | | | | | | | option. Now different encoding between XML file's encoding and XML declaration's encodiong is support. [Feature #4872] (work in progress) * lib/rexml/xmldecl.rb (REXML::XMLDecl#write): Always use XMLDecl's encoding. * test/rexml/test_document.rb: Update tests for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/xmldecl.rb (REXML::XMLDecl): Stop using REXML::Encodingkou2012-11-031-7/+4
| | | | | | | | | | | module because XMLDecl doesn't convert encoding. This causes removing XML encoding name normalization (encoding.upcase). Encoding name in XML declaration is what user specifies. I think this is reasonable change. * test/rexml/test_xml_declaration.rb: Add tests for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/source.rb: Move encoding detection code to base class.kou2012-10-282-58/+56
| | | | | | | * lib/rexml/encoding.rb: Remove needless encoding detection code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/baseparser.rb: Fix a bug that UTF-8 is usedkou2012-10-281-0/+3
| | | | | | | | | for UTF-16XX encoded XML that doesn't have encoding="UTF-16" in XML declration. * test/rexml/test_document.rb: Add tests for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/source.rb (REXML::IOSource#initialize): Reducekou2012-10-282-14/+40
| | | | | | | | | | | | @line_break initialize code. It should be done only in #encoding=. * lib/rexml/parsers/baseparser.rb: Don't set UTF-16 encoding to source by encoding="UTF-16" in XML declaration because UTF-16XX source encoding should be set in Source#initialize or IOSource#intialize. They should handle BOM. Parser should not consider about it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r37358kou2012-10-281-2/+2
| | | | | | | | | * lib/rexml/source.rb (REXML::IOSource#initialize): Use encode("UTF-16XX") instead of UTF-16XX encoded byte string by hand. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/source.rb (REXML::IOSource#initialize): Usekou2012-10-281-2/+2
| | | | | | | | encode("UTF-16XX") instead of UTF-16XX encoded byte string by hand. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/document.rb (REXML::Document#write): Add :encoding optionkou2012-10-281-5/+7
| | | | | | | | | to support custom XML encoding. [Feature #4872] (work in progress) * test/rexml/test_document.rb: Add tests for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/document.rb (REXML::Document#write): Remove needlesskou2012-10-281-1/+1
| | | | | | | indent in document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/document.rb (REXML::Document#write): Accept optionskou2012-10-281-5/+37
| | | | | | | | Hash as argument. * test/rexml/test_document.rb: Add tests for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/document.rb (REXML::Document#write): Fix wrong usagekou2012-10-281-2/+2
| | | | | | | in document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/document.rb (REXML::Document#write): Fix wrong methodkou2012-10-281-2/+2
| | | | | | | names in document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eliminate `shadowing outer local variable - name` warning.tenderlove2012-02-081-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/baseparser.rb: use meaningful name.kou2012-02-021-13/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/baseparser.rb, test/rexml/test_namespace.rb:kou2012-02-021-1/+1
| | | | | | | | fix the default xml namespace URI validation. Reported by Miho Hiramatsu. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/baseparser.rb: use private instead of _xxxkou2012-01-031-2/+3
| | | | | | | | method name. This is Ruby code not Python code. refs #5696 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/baseparser.rb: rexml BaseParser usesayumin2012-01-031-13/+9
| | | | | | | instance_eval unnecessarily on listener add. patch from Charles Nutter. [Bug #5696] [ruby-core:41437] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/lib/pathname.rb, ext/tk/lib/multi-tk.rb,ktsj2011-11-052-4/+4
| | | | | | | | | | | | | ext/tk/sample/demos-en/widget, lib/benchmark.rb, lib/irb/cmd/fork.rb, lib/mkmf.rb, lib/net/ftp.rb, lib/net/smtp.rb, lib/open3.rb, lib/pstore.rb, lib/rexml/element.rb, lib/rexml/light/node.rb, lib/rinda/tuplespace.rb, lib/rss/maker/base.rb, lib/rss/maker/entry.rb, lib/scanf.rb, lib/set.rb, lib/shell.rb, lib/shell/command-processor.rb, lib/shell/process-controller.rb, lib/shell/system-command.rb, lib/uri/common.rb: remove unused block arguments to avoid creating Proc objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/baseparser.rb, test/rexml/test_comment.rb:kou2011-09-071-1/+1
| | | | | | | | allow a single hyphen in comment. [Bug 5278] Reported by Thomas Fritzsche. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/formatters/pretty.rbkou2011-06-111-1/+1
| | | | | | | | | | | (REXML::Formatters::Pretty#write_text), test/rexml/test_core.rb (Tester#test_pretty_format_long_text_finite): don't ignore 'width' parameter in pretty formatter. fixes #4498 Reported by Michael Frasca. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/xpathparser.rbkou2011-06-111-1/+2
| | | | | | | | | | | (REXML::Parsers::XPathParser#parse), test/rexml/test_elements.rb (ElementsTester::test_each_with_frozen_condition): don't modify original XPath. fixes #4164 Reported by Pavel Shved. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* prevent an error when passing a frozen string to REXML::Text.newshyouhei2011-05-271-1/+1
| | | | | | | | dup the string passed in instead of cloning so that it's frozen state is ignored Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib: revert r31635-r31638 and untabify with expand(1).nobu2011-05-1911-115/+115
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib: Convert tabs to spaces for ruby files perdrbrain2011-05-1812-129/+129
| | | | | | | | | http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style Patch by Steve Klabnik [Ruby 1.9 - Bug #4730] Patch by Jason Dew [Ruby 1.9 - Feature #4718] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/functions.rb: Add some documentation for REXML::Functions.drbrain2011-05-131-0/+7
| | | | | | | Patch by Sebastian Martinez. [Ruby 1.9 - Feature #4688] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_obj_equal): Add documentation. Patch by Vincent Batts.drbrain2011-05-113-0/+15
| | | | | | | | | | [Ruby 1.9 - Bug #4664] * lib/rexml: ditto * lib/mkmf.rb: ditto * ext/socket/lib/socket.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/encoding.rb (REXML::Encoding#encoding=): store @encodingnaruse2011-03-027-43/+26
| | | | | | | | | | | | | | | | | a String which means the name of the encoding. this partially revert r29646. * lib/rexml/document.rb: follow above. * lib/rexml/output.rb: ditto. * lib/rexml/parsers/baseparser.rb: ditto. * lib/rexml/source.rb: ditto. * lib/rexml/xmldecl.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/light/node.rb: remove circular require.kou2010-12-071-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/doctype.rb, test/rexml/test_doctype.rb: suppress warnings.kou2010-12-071-5/+5
| | | | | | | | [ruby-core:33305] Reported by Aaron Patterson. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/formatters/pretty.rb (REXML::Formatters::Pretty#wrap):kou2010-11-181-5/+7
| | | | | | | | | | | | REXML::Formatters::Pretty#wrap used a recursive method call to format text. This switches it to use an iterative approach. [ruby-core:33245] Patch by Jeremy Evans. Thanks!!! * test/rexml/test_core.rb: add a test for it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/*.rb: Remove unused variable warnings.marcandre2010-11-0811-16/+7
| | | | | | Patch by Run Paint [ruby-core:30991] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/encoding.rb: untabify.kou2010-10-301-46/+45
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/encoding.rb: use Ruby native encoding mechnism. [ruby-dev:42464]kou2010-10-3019-466/+78
| | | | | | | | | | | | | | | | * lib/rexml/encodings/: remove. * lib/rexml/document.rb, lib/rexml/formatters/default.rb, lib/rexml/output.rb, lib/rexml/parseexception.rb, lib/rexml/parsers/baseparser.rb, lib/rexml/source.rb, lib/rexml/xmldecl.rb: use Ruby's native Encoding object. * test/rexml/, test/rss/: follow the above encoding chagnes. * NEWS: add REXML's incompatible change about encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/xpath_parser.rb, test/rexml/test_xpath.rb:kou2010-09-171-1/+2
| | | | | | | | add missing method availability check. [ruby-core:32447] Reported by Wiebe Cazemier. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/source.rb: force_encoding("UTF-8") when the inputnaruse2010-04-141-14/+25
| | | | | | is already UTF-8. patched by Kouhei Sutou [ruby-core:23404] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/quickpath.rb (REXML::QuickPath::predicate): fix regexp.naruse2010-04-071-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Refix previous commit.naruse2010-04-061-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix previous commit.naruse2010-04-061-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove warning.naruse2010-04-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/text.rb (REXML::Text.check): comment outnaruse2010-04-051-4/+5
| | | | | | broken logic. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/baseparser.rb (LETTER, DIGIT):naruse2010-04-054-15/+7
| | | | | | | | | | | | | | | | always use POSIX charclass. * lib/rexml/parsers/baseparser.rb (NAMECHAR): remove duplicated range. * lib/rexml/xmltokens.rb (NCNAME_STR, NAMECHAR): ditto. * lib/rexml/parsers/xpathparser.rb (PathExpr): ditto. * lib/rexml/text.rb (REXML::Text#initialize): initialize @parent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib: fixed typo. a patch by Sho Hashimoto in [ruby-dev:40716].nobu2010-03-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/text.rb (REXML::Text#initialize): REXML::Text.new checksmame2010-02-091-2/+2
| | | | | | | raw text for illegal characters without entity check, for the sake of 1.8 compatibility. This had caused rubyspec error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/text.rb (REXML::Text#initialize): do Text.check only whenmame2010-01-311-1/+1
| | | | | | | parent is specified, since Text.check may need doctype. partially revert r26518. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/text.rb (REXML::Text#initialize): fix typo and a bug thatmame2010-01-311-2/+2
| | | | | | seems to be caused by refactoring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parent.rb (REXML::Parent#delete): return the deleted nodemame2010-01-311-0/+1
| | | | | | | because the rdoc of REXML::Element#delete_element says it returns "the element that was removed." git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/document.rb (REXML::Document#add): fix duplicate XMLDeclsmame2010-01-311-8/+10
| | | | | | | and bad DocTypes in REXML::Document. (Bug #19058) [ruby-core:27979] based on the patch by Federico Builes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/text.rb: String no longer has #each.yugui2010-01-031-1/+1
| | | | | | Patch by Mitsutaka Mimura (takkanm). [ruby-dev:39949]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::STANDALONE):nobu2009-12-292-2/+2
| | | | | | | | any number spaces can be placed between equal-sign and the value. patch from Ed Howland in [ruby-core:27345]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e