1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix failing test.

This commit is contained in:
José Valim 2011-05-09 17:08:59 +02:00
parent 372d72445b
commit 2750f2ee00

View file

@ -141,7 +141,7 @@ module ActiveSupport
def _dasherize(key)
# $2 must be a non-greedy regex for this to work
left, middle, right = /\A(_*)(.*?)(_*)\Z/.match(key.strip)[1,3]
"#{left}#{middle.tr('_', '-')}#{right}"
"#{left}#{middle.tr('_ ', '--')}#{right}"
end
# TODO: Add support for other encodings