diff options
author | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2021-09-22 18:14:13 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-09-22 23:37:59 +0900 |
commit | 357406da8b463978b6db68ef5672b76067506c64 (patch) | |
tree | 6749f632d569711a6117be2b436d023b8b83e46b /lib/reline/windows.rb | |
parent | 782d1d876bb119284f52a7eb59e63f3571c4d55e (diff) |
[ruby/reline] Use `unpack1` instead of `unpack(template)[0]`
https://github.com/ruby/reline/commit/45aa367616
Diffstat (limited to 'lib/reline/windows.rb')
-rw-r--r-- | lib/reline/windows.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline/windows.rb b/lib/reline/windows.rb index 642f33aedf..5bbf1e9d57 100644 --- a/lib/reline/windows.rb +++ b/lib/reline/windows.rb @@ -184,7 +184,7 @@ class Reline::Windows # DWORD FileNameLength; # WCHAR FileName[1]; # } FILE_NAME_INFO - len = p_buffer[0, 4].unpack("L")[0] + len = p_buffer[0, 4].unpack1("L") name = p_buffer[4, len].encode(Encoding::UTF_8, Encoding::UTF_16LE, invalid: :replace) # Check if this could be a MSYS2 pty pipe ('\msys-XXXX-ptyN-XX') |