runtime/msgpack: Fix msgpack#string that expects old string() behavior

This commit is contained in:
ZyX 2016-01-31 00:14:25 +03:00
parent 610b48c5b0
commit 18d1ba3422

View File

@ -395,7 +395,8 @@ endfunction
""
" Dump floating-point value.
function s:msgpack_dump_float(v) abort
return string(type(a:v) == type({}) ? a:v._VAL : a:v)
return substitute(string(type(a:v) == type({}) ? a:v._VAL : a:v),
\'\V\^\(-\)\?str2float(''\(inf\|nan\)'')\$', '\1\2', '')
endfunction
""