aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/xml_mini/rexml.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add `Style/RedundantFreeze` to remove redudant `.freeze`Yasuo Honda2018-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | Since Rails 6.0 will support Ruby 2.4.1 or higher `# frozen_string_literal: true` magic comment is enough to make string object frozen. This magic comment is enabled by `Style/FrozenStringLiteralComment` cop. * Exclude these files not to auto correct false positive `Regexp#freeze` - 'actionpack/lib/action_dispatch/journey/router/utils.rb' - 'activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb' It has been fixed by https://github.com/rubocop-hq/rubocop/pull/6333 Once the newer version of RuboCop released and available at Code Climate these exclude entries should be removed. * Replace `String#freeze` with `String#-@` manually if explicit frozen string objects are required - 'actionpack/test/controller/test_case_test.rb' - 'activemodel/test/cases/type/string_test.rb' - 'activesupport/lib/active_support/core_ext/string/strip.rb' - 'activesupport/test/core_ext/string_ext_test.rb' - 'railties/test/generators/actions_test.rb'
* Enable `Performance/UnfreezeString` copyuuji.yaginuma2018-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Ruby 2.3 or later, `String#+@` is available and `+@` is faster than `dup`. ```ruby # frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "benchmark-ips" end Benchmark.ips do |x| x.report('+@') { +"" } x.report('dup') { "".dup } x.compare! end ``` ``` $ ruby -v benchmark.rb ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux] Warming up -------------------------------------- +@ 282.289k i/100ms dup 187.638k i/100ms Calculating ------------------------------------- +@ 6.775M (± 3.6%) i/s - 33.875M in 5.006253s dup 3.320M (± 2.2%) i/s - 16.700M in 5.032125s Comparison: +@: 6775299.3 i/s dup: 3320400.7 i/s - 2.04x slower ```
* [Active Support] require_relative => requireAkira Matsuda2017-10-211-2/+2
| | | | This basically reverts 8da30ad6be34339124ba4cb4e36aea260dda12bc
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* Merge branch 'master' into require_relative_2017Xavier Noria2017-07-021-1/+1
|\
| * Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
| * Merge pull request #29540 from kirs/rubocop-frozen-stringMatthew Draper2017-07-021-0/+1
| |\ | | | | | | | | | Enforce frozen string in Rubocop
| | * Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
| | |
| * | Make ActiveSupport frozen string literal friendly.Pat Allan2017-06-201-1/+1
| |/ | | | | | | | | | | | | The ActiveSupport test suite only passes currently if it uses the latest unreleased commits for dalli, and a patch for Builder: https://github.com/tenderlove/builder/pull/6 Beyond that, all external dependencies (at least, to the extent they’re used by ActiveSupport) are happy, including Nokogiri as of 1.8.0.
* / [Active Support] require => require_relativeAkira Matsuda2017-07-011-2/+2
|/
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-1/+1
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-1/+1
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* applies new string literal convention in activesupport/libXavier Noria2016-08-061-7/+7
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fix Hash#from_xml with frozen strings (#24718)Marek Kirejczyk2016-05-211-3/+1
| | | | | | | | | * Hash#from_xml works with frozen strings Fixes #24647 * Fix rexml engine test [Marek Kirejczyk + Rafael Mendonça França]
* enforce a depth limit on XML documentsAaron Patterson2015-06-161-5/+6
| | | | | | | XML documents that are too deep can cause an stack overflow, which in turn will cause a potential DoS attack. CVE-2015-3227
* update AS/values and AS/xml_mini docs [ci skip]Francesco Rodriguez2012-09-141-1/+1
|
* Clean up module docs [ci skip]Vijay Dev2012-03-071-1/+0
| | | | Removed some useless docstrings and no-doc'ed some.
* fixed a missing require that causes trouble when using AS in a non-rails env.Nick Sutterer2011-01-181-0/+1
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* edit pass: the names of Rails components have a space, ie, "Active Record", ↵Xavier Noria2010-06-141-1/+1
| | | | not "ActiveRecord"
* Provide a better error if the parsed REXML document has no root [#3803 ↵wycats2010-03-281-1/+7
| | | | state:resolved]
* require reporting before attempting to "shush"Joshua Peek2009-09-131-0/+1
|
* Shush, rexmlJeremy Kemper2009-09-131-1/+1
|
* Merge docrailsPratik Naik2009-07-251-1/+1
|
* enable *real* IO parsing for the libxml, nokogiri and rexml backends [#2659 ↵Brian Lopez2009-06-091-6/+12
| | | | | | state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Add support for parsing XML and JSON from an IO as well as a string [#2659 ↵Brian Lopez2009-05-171-5/+9
| | | | | | state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Fix dependencies revealed by testing in isolationJeremy Kemper2009-04-221-0/+2
|
* Avoid need for Enumerable#sum extensionJeremy Kemper2009-03-281-1/+3
|
* Require libxml-ruby 0.9.4 or 0.9.7 pending a segfault bugfix for 1.0.Jeremy Kemper2009-03-091-2/+4
| | | | Delegate parsing to a switchable backend.
* Revert "Revert "XmlMini supports different backend parsers, starting with ↵Jeremy Kemper2009-03-091-0/+106
| | | | | | | | libxml"" Will change to require a known-working libxml-ruby. This reverts commit a995a738ca10f9bef023689df70d26aad8931b9a.
* Revert "XmlMini supports different backend parsers, starting with libxml"David Heinemeier Hansson2009-03-091-106/+0
| | | | | | Spews a ton undefined method `default_keep_blanks=' for XML:Module errors. This reverts commit 822c41d69d9228c9912d29ac45155d3a16bb5c50.
* XmlMini supports different backend parsers, starting with libxmlBart ten Brinke2009-03-081-0/+106
[#2084 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>