| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
We sometimes say "✂️ newline after `private`" in a code review (e.g.
https://github.com/rails/rails/pull/18546#discussion_r23188776,
https://github.com/rails/rails/pull/34832#discussion_r244847195).
Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style
`EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059).
That cop and enforced style will reduce the our code review cost.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`String#to_d` does not raise an exception if an invalid value is specified.
So can remove exception handling.
```
$ bundle exec ruby -v -rbigdecimal -rbigdecimal/util -e 'p "123,003".to_d'
ruby 2.6.0dev (2018-12-21 trunk 66474) [x86_64-linux]
0.123e3
```
|
|
|
|
|
|
|
|
|
| |
This patch modifies XmlMini::Parsing["decimal"] to handle a string that
contains an invalid number. Since [ruby/ruby@a0e438c#diff-6b866d482baf2bdfd8433893fb1f6d36R144](https://github.com/ruby/ruby/commit/a0e438cd3c28d2eaf4efa18243d5b6edafa14d88#diff-6b866d482baf2bdfd8433893fb1f6d36R144) this case raises an `ArgumentError`. `String.to_f` returns 0.0 if there is not a valid number at the start of the argument, so current behavior is conserved.
See https://travis-ci.org/rails/rails/jobs/463180341#L6264
Related: #34600, #34601
|
|
|
|
|
| |
We should call methods with `.method_name` not `::method_name`. Fix two
instances of `YAML::load` I found in favor of `YAML.load`.
|
|
|
|
|
|
| |
Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug.
References #32028
|
|
|
|
| |
This basically reverts 8da30ad6be34339124ba4cb4e36aea260dda12bc
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Some methods were added to public API in
5b14129d8d4ad302b4e11df6bd5c7891b75f393c and they should be not part of
the public API.
|
| |
|
|
|
|
|
| |
BigDecimal('an invalid string') has changed its behavior to raise an ArgumentError since 1.3.0
https://bugs.ruby-lang.org/issues/10286
|
| |
|
|
|
|
| |
https://bugs.ruby-lang.org/issues/12739
|
|
|
|
|
|
| |
All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772.
But comments was still kept absolute position. This commit aligns
comments with method definitions for consistency.
|
|
|
|
|
|
|
|
| |
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
|
| |
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|
|
|
|
|
|
|
| |
Ruby 2.4 unifies Fixnum and Bignum into Integer: https://bugs.ruby-lang.org/issues/12005
* Forward compat with new unified Integer class in Ruby 2.4+.
* Backward compat with separate Fixnum/Bignum in Ruby 2.2 & 2.3.
* Drops needless Fixnum distinction in docs, preferring Integer.
|
|
|
|
|
|
|
| |
XML documents that are too deep can cause an stack overflow, which in
turn will cause a potential DoS attack.
CVE-2015-3227
|
|
|
|
|
|
|
| |
- Boolean parsing breaks on non strings (i.e. integer 1|0)
- Symbol parsing breaks on non strings.
- BigDecimal parsing breaks due to missing require.
- Update changelog.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`XmlMini.with_backend` now may be safely used with threads:
Thread.new do
XmlMini.with_backend("REXML") { rexml_power }
end
Thread.new do
XmlMini.with_backend("LibXML") { libxml_power }
end
Each thread will use it's own backend.
|
| |
|
|
|
|
|
|
|
|
|
| |
XmlMini define the xml 'datatime', but according to
http://www.w3.org/TR/xmlschema-2/#dateTime could be better
change this to 'dateTime' with upper case letter 'T.
So 'DateTime' and 'Time' are redefined from 'datetime' to 'dateTime'
add the changing to the changelog
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
lower-camelcase tags [#5903 state:resolved]
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
|
|
| |
This resolves issues for libraries which use '_' prefixed keys in their
attributes hash, such as Mongoid. A key like "_id" or "_type" will no
longer be converted to "<-id>" and "<-type>".
Signed-off-by: wycats <wycats@gmail.com>
|
| |
|
|
|
|
|
|
| |
both Hash and Array depends on.
Also, refactored ActiveModel serializers to just use ActiveSupport::XmlMini.to_tag. As consequence, if a serialized attribute is an array or a hash, it's not encoded as yaml, but as a hash or array.
|
| |
|
|
|
|
| |
XmlMini backend tests.
|
|
|
|
|
|
| |
[#2190 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
| |
|
|
|
|
| |
Delegate parsing to a switchable backend.
|
|
|
|
|
|
|
|
| |
libxml""
Will change to require a known-working libxml-ruby.
This reverts commit a995a738ca10f9bef023689df70d26aad8931b9a.
|
|
|
|
|
|
| |
Spews a ton undefined method `default_keep_blanks=' for XML:Module errors.
This reverts commit 822c41d69d9228c9912d29ac45155d3a16bb5c50.
|
|
|
|
|
|
| |
[#2084 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
| |
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
| |
|
|
|