mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix failing xml mini test.
This commit is contained in:
parent
67c3469e6f
commit
ad129639c7
1 changed files with 4 additions and 1 deletions
|
@ -139,7 +139,10 @@ module ActiveSupport
|
|||
protected
|
||||
|
||||
def _dasherize(key)
|
||||
key.gsub(/(?!^[_]*)_(?![_]*$)/, '-')
|
||||
left = key.strip.rpartition(/^_*/)
|
||||
right = left.pop.partition(/_*$/)
|
||||
right.first.tr!('_ ', '--')
|
||||
left.concat(right).join
|
||||
end
|
||||
|
||||
# TODO: Add support for other encodings
|
||||
|
|
Loading…
Reference in a new issue