ahoward / systemu

univeral capture of stdout and stderr and handling of child process pid for windows, *nix, etc.
Other
126 stars 33 forks source link

fix Ruby 1.9 encoding related issue: make sure buf has correct encoding. #15

Closed grafi-tt closed 10 years ago

grafi-tt commented 12 years ago

IO#read() always returns ASCII-8BIT string on Ruby 1.9, regardless of external_encoding of IO object. Without this fix, Object.systemu returns ASCII-8BIT string as 'stdout' and 'stderr', but it is unnatural on Ruby 1.9.