Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | ActiveSupport typo fixes. | alkesh26 | 2019-02-01 | 1 | -1/+1 |
| | |||||
* | Handle more unsafe String methods (#33990) | Janosch Müller | 2018-09-27 | 1 | -9/+34 |
| | | | | | | | | | | * Handle more unsafe String methods * Fix codeclimate issue * Revert stylistic change [Janosch Müller + Rafael Mendonça França] | ||||
* | Use assert_predicate instead | Yumin Wong | 2018-09-06 | 1 | -2/+2 |
| | | | | Co-authored-by: no-itsbackpack <no-itsbackpack@github.com> | ||||
* | SafeBuffer should maintain safety upon getting a slice via a range if ↵ | Yumin Wong | 2018-08-31 | 1 | -0/+12 |
| | | | | | | original buffer was safe. Co-Authored-By: no-itsbackpack <no-itsbackpack@github.com> | ||||
* | Fix `CustomCops/AssertNot` to allow it to have failure message | Ryuta Kamizono | 2018-05-13 | 1 | -2/+2 |
| | | | | Follow up of #32605. | ||||
* | Use assert_predicate and assert_not_predicate | Daniel Colson | 2018-01-25 | 1 | -7/+7 |
| | |||||
* | [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment` | Koichi ITO | 2017-07-11 | 1 | -0/+1 |
| | |||||
* | Use frozen-string-literal in ActiveSupport | Kir Shatrov | 2017-07-09 | 1 | -0/+1 |
| | |||||
* | Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" | Matthew Draper | 2017-07-02 | 1 | -1/+0 |
| | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. | ||||
* | Enforce frozen string in Rubocop | Kir Shatrov | 2017-07-01 | 1 | -0/+1 |
| | |||||
* | "Use assert_nil if expecting nil from ...:in `...'. This will fail in ↵ | Akira Matsuda | 2016-12-25 | 1 | -1/+1 |
| | | | | minitest 6." | ||||
* | Expectation first | Akira Matsuda | 2016-12-25 | 1 | -1/+1 |
| | |||||
* | Add more rubocop rules about whitespaces | Rafael Mendonça França | 2016-10-29 | 1 | -1/+1 |
| | |||||
* | Add three new rubocop rules | Rafael Mendonça França | 2016-08-16 | 1 | -1/+1 |
| | | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository. | ||||
* | applies new string literal convention in activesupport/test | Xavier Noria | 2016-08-06 | 1 | -41/+41 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | Properly dump primitive-like AS::SafeBuffer strings as YAML | Godfrey Chan | 2015-02-11 | 1 | -0/+7 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `coder.represent_scalar` means something along the lines of "Here is a quoted string, you can just add it to the output", which is not the case here. It only works for simple strings that can appear unquoted in YAML, but causes problems for e.g. primitive-like strings ("1", "true"). `coder.represent_object` on the other hand, means that "This is the Ruby-object representation for this thing suitable for use in YAML dumping", which is what we want here. Before: YAML.load ActiveSupport::SafeBuffer.new("Hello").to_yaml # => "Hello" YAML.load ActiveSupport::SafeBuffer.new("true").to_yaml # => true YAML.load ActiveSupport::SafeBuffer.new("false").to_yaml # => false YAML.load ActiveSupport::SafeBuffer.new("1").to_yaml # => 1 YAML.load ActiveSupport::SafeBuffer.new("1.1").to_yaml # => 1.1 After: YAML.load ActiveSupport::SafeBuffer.new("Hello").to_yaml # => "Hello" YAML.load ActiveSupport::SafeBuffer.new("true").to_yaml # => "true" YAML.load ActiveSupport::SafeBuffer.new("false").to_yaml # => "false" YAML.load ActiveSupport::SafeBuffer.new("1").to_yaml # => "1" YAML.load ActiveSupport::SafeBuffer.new("1.1").to_yaml # => "1.1" If we ever want Ruby to behave more like PHP or JavaScript though, this is an excellent trick to use ;) | ||||
* | Just check if the buffer exists before changing it | Rafael Mendonça França | 2014-12-29 | 1 | -5/+1 |
| | |||||
* | When trying to access a character on a string buffer object via `:[]`, if ↵ | Vipul A M | 2014-12-29 | 1 | -0/+9 |
| | | | | | | | | | | | | | | | | the object being accessed currently returns `html_safe?` as true, we used to set `@html_safe` variable as true on new object created. When doing something like x = 'Hello'.html_safe x[/a/, 1] would throw an error on ruby 2.2, since when nothign gets matched nil is returned by the code and it tries to set `@html_safe` value to true, which would error since starting 2.2 nil is frozen. This change adds a safety net to avoid setting `@html_safe = true` on frozen objects. Fixes #18235 | ||||
* | Fixes interpolation on SafeBuffer | Julien Letessier | 2013-12-14 | 1 | -0/+25 |
| | | | | | | | | | Interpolation was untested and did not work with hash arguments. Adds - support for interpolation with hash argument - tests for the above - tests for safe/unsafe interpolation | ||||
* | Ensure [] respects the status of the buffer. | José Valim | 2012-02-29 | 1 | -4/+23 |
| | |||||
* | delete vulnerable AS::SafeBuffer#[] | Akira Matsuda | 2012-02-20 | 1 | -6/+0 |
| | |||||
* | add AS::SafeBuffer#clone_empty | Akira Matsuda | 2012-02-20 | 1 | -0/+9 |
| | |||||
* | global variables may not be set depending on the match. fixes #4703 | Aaron Patterson | 2012-01-26 | 1 | -0/+4 |
| | |||||
* | No need to require psych since require yaml does that. | Rafael Mendonça França | 2012-01-04 | 1 | -1/+0 |
| | |||||
* | No need to use rescue block to require psych | Rafael Mendonça França | 2012-01-04 | 1 | -5/+1 |
| | |||||
* | Whitespaces :scissors: | Rafael Mendonça França | 2012-01-04 | 1 | -1/+1 |
| | |||||
* | Add test to make sure that add two safe buffers always return a safe buffer | Rafael Mendonça França | 2012-01-04 | 1 | -0/+7 |
| | |||||
* | Revert removing gsub and sub from safe buffer. | José Valim | 2011-09-08 | 1 | -27/+14 |
| | |||||
* | this should have gone with the previous commit | Xavier Noria | 2011-09-08 | 1 | -2/+2 |
| | |||||
* | remove support of symbols on classify and camelize | Damien Mathieu | 2011-09-08 | 1 | -14/+27 |
| | |||||
* | Reset @dirty to false when slicing an instance of SafeBuffer | Brian Cardarella | 2011-07-29 | 1 | -0/+6 |
| | |||||
* | remove unused variables warnings removed | Vishnu Atrai | 2011-07-26 | 1 | -2/+0 |
| | |||||
* | Using slice for instead of gsub to pass with 1.8.7 | Arun Agrawal | 2011-06-23 | 1 | -1/+1 |
| | |||||
* | calling unsafe methods which don't return a string shouldn't fail | Damien Mathieu | 2011-06-22 | 1 | -0/+4 |
| | |||||
* | safe_concat should not work on dirty buffers. | José Valim | 2011-06-16 | 1 | -0/+7 |
| | |||||
* | Fix safe buffer by adding a dirty status. | José Valim | 2011-06-16 | 1 | -6/+31 |
| | |||||
* | Ensure that the strings returned by SafeBuffer#gsub and friends aren't ↵ | Michael Koziarski | 2011-06-07 | 1 | -0/+12 |
| | | | | | | | | | | considered html_safe? Also make sure that the versions of those methods which modify a string in place such as gsub! can't be called on safe buffers at all. Conflicts: activesupport/test/safe_buffer_test.rb | ||||
* | make sure we play nicely when syck is activated | Aaron Patterson | 2011-01-28 | 1 | -0/+22 |
| | |||||
* | Deleted all references to ActionView::SafeBuffer in favor of ↵ | Santiago Pastorino | 2010-01-31 | 1 | -0/+41 |
ActiveSupport::SafeBuffer Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local> |