aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rexml
Commit message (Collapse)AuthorAgeFilesLines
* rexml: add close tag check on end of document to StreamParserkou2017-06-071-0/+8
| | | | | | | | | [ruby-core:81593] [Bug #13636] Reported by Anton Sivakov. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rexml: REXML::Element#[] accepts String or Symbol as attribute namekou2016-12-061-0/+24
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: round to nearest evennobu2016-11-051-4/+7
| | | | | | | | | * numeric.c (flo_round, int_round): support round-to-nearest-even semantics of IEEE 754 to match sprintf behavior, and add `half:` optional keyword argument for the old behavior. [ruby-core:76273] [Bug #12548] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/attribute.rb (REXML::Attribute#to_string): Fix wrongkou2016-07-221-1/+1
| | | | | | | | | entry reference name of double quote. [Bug#12609][ruby-core:76509] Patch by Joseph Marrero. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use Integer instead of Fixnum and Bignum.akr2016-05-173-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | * object.c, numeric.c, enum.c, ext/-test-/bignum/mul.c, lib/rexml/quickpath.rb, lib/rexml/text.rb, lib/rexml/xpath_parser.rb, lib/rubygems/specification.rb, lib/uri/generic.rb, bootstraptest/test_eval.rb, basictest/test.rb, test/-ext-/bignum/test_big2str.rb, test/-ext-/bignum/test_div.rb, test/-ext-/bignum/test_mul.rb, test/-ext-/bignum/test_str2big.rb, test/csv/test_data_converters.rb, test/date/test_date.rb, test/json/test_json_generate.rb, test/minitest/test_minitest_mock.rb, test/openssl/test_cipher.rb, test/rexml/test_jaxen.rb, test/ruby/test_array.rb, test/ruby/test_basicinstructions.rb, test/ruby/test_bignum.rb, test/ruby/test_case.rb, test/ruby/test_class.rb, test/ruby/test_complex.rb, test/ruby/test_enum.rb, test/ruby/test_eval.rb, test/ruby/test_iseq.rb, test/ruby/test_literal.rb, test/ruby/test_math.rb, test/ruby/test_module.rb, test/ruby/test_numeric.rb, test/ruby/test_range.rb, test/ruby/test_rational.rb, test/ruby/test_refinement.rb, test/ruby/test_rubyvm.rb, test/ruby/test_struct.rb, test/ruby/test_variable.rb, test/rubygems/test_gem_specification.rb, test/thread/test_queue.rb: Use Integer instead of Fixnum and Bignum. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-1650-0/+50
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/source.rb (REXML::IOSource#scan): Fix a typo inkou2015-06-141-1/+1
| | | | | | | | | | | | document. [fix GH-934] [ci skip] Patch by Anton Davydov. Thanks!!! warrent warrant ? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/attlistdecl.rb (REXML::AttlistDecl): Fix a typo inkou2015-06-141-1/+1
| | | | | | | | | | | | document. [fix GH-934] [ci skip] Patch by Anton Davydov. Thanks!!! for seeable foreseeable + git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* elementdecl.rb: suppress warningsnobu2014-11-231-2/+2
| | | | | | | * lib/rexml/dtd/elementdecl.rb (PATTERN_RE): comment out overridden constant, and '_' is included in '\w'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/document.rb: add REXML::Document#document.nagachika2014-11-132-0/+5
| | | | | | reported by Tomas Hoger <thoger@redhat.com> and patched by nahi. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/entity.rb: keep the entity size within the limitation.usa2014-10-271-0/+6
| | | | | | | | reported by Willis Vandevanter <will@silentrobots.com> and patched by nahi. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/source.rb (REXML::IOSource#encoding_updated): Fix akou2014-10-231-1/+1
| | | | | | | | | | | | | | | | bug that can't parse XML correctly when Encoding.default_internal is different with XML encoding. REXML::Source converts XML encoding on read. So IO should not convert XML encoding. Based on patch by NAKAMURA Usaku. [ruby-dev:48686] [Bug #10418] * test/rexml/test_encoding.rb (REXMLTests::EncodingTester#test_parse_utf16_with_utf8_default_internal): Add the for the above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/**/*.rb: removed commented-out code.hsbt2014-09-217-178/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/core.rb: remove unused variables.hsbt2014-07-275-11/+4
| | | | | | | | | | | | | | | | * lib/erb.rb: ditto. * lib/mkmf.rb: ditto. * lib/net/http/response.rb: ditto. * lib/optparse/version.rb: ditto. * lib/prime.rb: ditto. * lib/racc/parser.rb: ditto. * lib/rexml/document.rb: ditto. * lib/rexml/dtd/dtd.rb: ditto. * lib/rexml/element.rb: ditto. * lib/rexml/functions.rb: ditto. * lib/rexml/parsers/xpathparser.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/xmltokens.rb: Add missing non ASCII valid characterskou2014-02-231-5/+71
| | | | | | | | | | | | | to element name characters. Now, REXML name tokens exactly match "[5] Name" in the XML spec and "[4] NCName" in the Namespaces in XML spec. See comment about the details. [Bug #9539] [ruby-core:60901] Reported by Mario Barcala. Thanks!!! * test/rexml/xpath/test_node.rb: Add tests for the above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/xpath_parser.rb: Fix indent.kou2014-02-221-10/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/html.rb: fix typo by @windwiny [fix GH-506]hsbt2014-01-194-4/+4
| | | | | | | | | | | | | | * lib/net/http.rb: ditto * lib/rexml/attribute.rb: ditto * lib/rexml/element.rb: ditto * lib/rexml/source.rb: ditto * lib/rexml/streamlistener.rb: ditto * lib/rss/xmlparser.rb: ditto * lib/rubygems/commands/generate_index_command.rb: ditto * lib/shell.rb: ditto * lib/uri/common.rb:ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/entity.rb: [DOC] Fix typoa_matsuda2013-12-191-1/+1
| | | | | | | s/matchs/matches/ [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/ultralightparser.rbkou2013-11-161-1/+1
| | | | | | | | | | | | (REXML::Parsers::UltraLightParser#parse): Fix wrong :start_doctype position. [Bug #9061] [ruby-dev:47778] Patch by Ippei Obayashi. Thanks!!! * test/rexml/parser/test_ultra_light.rb: Add a test for this case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/streamparser.rb: Add dependency file require.kou2013-10-311-0/+2
| | | | | | | | [Bug #9062] [ruby-dev:47779] Reported by Ippei Obayashi. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/treeparser.rb (REXML::Parsers::TreeParser#parse):kou2013-09-031-2/+2
| | | | | | | | | | Add source information to parse exception on no close tag error. [Bug #8844] [ruby-dev:47672] Patch by Ippei Obayashi. Thanks!!! * test/rexml/parser/test_tree.rb: Add a test for the above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/treeparser.rb (REXML::Parsers::TreeParser#parse):kou2013-09-031-1/+1
| | | | | | | | | | Remove needless nested parse exception information. [Bug #8844] [ruby-dev:47672] Reported by Ippei Obayashi. Thanks!!! * test/rexml/parser/test_tree.rb: Add a test for the above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/sax2listener.rb (REXML::SAX2Listener#notationdecl): Fixkou2013-08-111-1/+1
| | | | | | | | | | | wrong number of arguments in the template listener. [Bug #8731] [ruby-dev:47582] Reported by Ippei Obayashi. * test/rexml/parser/test_sax2.rb: Add tests for parsing notation declarations with SAX2 API. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/sax2listener.rb (REXML::SAX2Listener#elementdecl): Fix wrongkou2013-08-111-6/+6
| | | | | | | | examples. [Bug #8731] [ruby-dev:47582] Reported by Ippei Obayashi. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/sax2parser.rbkou2013-08-111-24/+28
| | | | | | | (REXML::Parsers::SAX2Parser#handle_entitydecl): Extract. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):kou2013-08-111-2/+18
| | | | | | | | Fix wrong "%" position in parameter entity declaration event argument. * test/rexml/parser/test_sax2.rb: Add tests for the above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):kou2013-08-111-0/+6
| | | | | | | | Support NDATA in external entity declaration. * test/rexml/parser/test_sax2.rb: Add tests for the above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/baseparser.rbkou2013-08-111-1/+2
| | | | | | | | (REXML::Parsers::BaseParser#pull_event): Support optional NDATA in parameter entity declaration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * NEWS (REXML::Parsers::SAX2Parser): Add about this change.kou2013-08-112-2/+2
| | | | | | | | | | | | | | * lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse): Fix wrong number of arguments. Document says "an array of the entity declaration" but it passes two or more arguments. This is a bug but it break backward compatibility. Reported by Ippei Obayashi. [Bug #8731] [ruby-dev:47582] * lib/rexml/sax2listener.rb (REXML::SAX2Listener#entitydecl): ditto. The listener template accepted two arguments. * test/rexml/parser/test_sax2.rb: Add tests for external ID case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/baseparser.rbkou2013-08-101-1/+1
| | | | | | | | (REXML::Parsers::BaseParser::CDATA_END): Use "\A" instead of "^". It is not an used constant but I fix it. (Or shuold I remove it?) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser):kou2013-08-101-2/+3
| | | | | | | | Fix wrong constant name. "]>" pattern match is the same but it is used for "<!DOCTYPE" end mark not "<![CDATA[" end mark. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser):kou2013-08-101-7/+7
| | | | | | | | | | Use "\A" instead of "^" in document type declaration patterns because they are used as the head match in content not the head match in line. They don't cause any problems in the current code but it should be fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::SYSTEM):kou2013-08-101-1/+1
| | | | | | | | | Fix loose "head" match regular expression. It doesn't cause any problem in the current code but it should be fixed because readers may confuse it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::PUBLIC):kou2013-08-101-1/+1
| | | | | | | | | | | Fix loose "head" match regular expression. [Bug #8701] [ruby-dev:47551] Patch by Ippei Obayashi. Thanks!!! * test/rexml/parse/test_notation_declaration.rb (#test_system_public): Add a test for the above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/attribute.rb: [DOC] Update example for #namespacezzak2013-08-041-2/+5
| | | | | | | Patch by Ippei Obayashi [Bug #8685] [ruby-core:56173] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/streamparser.rbkou2013-07-261-0/+4
| | | | | | | | | | | (REXML::Parsers::StreamParser#parse): Add "entity" event support to listener. [Bug #8689] [ruby-dev:47542] Reported by Ippei Obayashi. * test/rexml/test_stream.rb (StreamTester#entity): Add a test for the above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/streamlistener.rb: [DOC] Fix examples inzzak2013-07-221-6/+6
| | | | | | | REXML::StreamListener#entitydecl patch by Ippei Obayashi [Bug #8665] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/text.rb (REXML::Text#<<): Support appending in notkou2013-07-071-0/+1
| | | | | | | | | | "raw" mode. [Bug #8602] [ruby-dev:47482] Reported by Ippei Obayashi. Thanks!!! * test/rexml/test_text.rb (TextTester#test_shift_operator_cache): Add a test for the above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/text.rb (REXML::Text#<<): Support method chain use by "<<"kou2013-07-071-0/+4
| | | | | | | | | like other objects. * test/rexml/test_text.rb (TextTester#test_shift_operator_chain): Add a test for the above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/text.rb (REXML::Text#clear_cache): Extract commonkou2013-07-071-3/+8
| | | | | | | cache clear code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/text.rb (REXML::Text.normalize): Fix a bug that allkou2013-04-261-1/+1
| | | | | | | | | | entity filters are ignored. [ruby-dev:47278] [Bug #8302] Patch by Ippei Obayashi. Thanks!!! * test/rexml/test_entity.rb (EntityTester#test_entity_filter): Add a test of the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/element.rb (REXML::Attributes#to_a): Supportkou2013-04-261-1/+1
| | | | | | | | | | | namespaced attributes. [ruby-dev:47277] [Bug #8301] Patch by Ippei Obayashi. Thanks!!! * test/rexml/test_attributes.rb (AttributesTester#test_to_a_with_namespaces): Add a test of the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rexml/document.rb, lib/rexml/element.rb,duerst2013-04-233-11/+5
| | | | | | | | lib/rexml/formatters/pretty.rb: remove opinionated language in documentation. [Bug #8309], reported by Charles Beckmann git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/security.rb (REXML::Security): create.kou2013-02-274-35/+39
| | | | | | | | | | | | * lib/rexml/rexml.rb: move entity_expansion_limit and entity_expansion_text_limit accessors to ... * lib/rexml/security.rb: ... here. * lib/rexml/document.rb: use REXML::Security. * lib/rexml/text.rb: use REXML::Security. * test/rexml/test_document.rb: use REXML::Security. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/document.rb: move entity_expansion_limit accessor to ...kou2013-02-262-5/+19
| | | | | | | | | | | * lib/rexml/rexml.rb: ... here for consistency. * lib/rexml/document.rb (REXML::Document.entity_expansion_limit): deprecated. * lib/rexml/document.rb (REXML::Document.entity_expansion_limit=): deprecated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/document.rb: move entity_expansion_limit accessor to ...kou2013-02-263-5/+20
| | | | | | | | | | | | | | | * lib/rexml/rexml.rb: ... here to make rexml/text independent from REXML::Document. It causes circular require. * lib/rexml/document.rb (REXML::Document.entity_expansion_limit): deprecated. * lib/rexml/document.rb (REXML::Document.entity_expansion_limit=): deprecated. * lib/rexml/text.rb: add missing require "rexml/rexml" for REXML.entity_expansion_limit. Reported by Robert Ulejczyk. Thanks!!! [ruby-core:52895] [Bug #7961] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):nagachika2013-02-221-1/+1
| | | | | | fix a typo in comment in r39384. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):usa2013-02-222-15/+37
| | | | | | | | | | new attribute to read/write entity expansion text limit. the default limit is 10Kb. * lib/rexml/text.rb (REXML::Text.unnormalize): check above attribute. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/element.rb (REXML::Elements#add): Remove too muchkou2013-01-031-1/+1
| | | | | | | "elements" in document. Sorry... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/element.rb (REXML::Elements#each): Add missingkou2013-01-031-4/+4
| | | | | | | | "elements" in document. [ruby-talk:402713] Reported by Wesley Rishel. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e