From a27a6623449d00af838ba87319454d92dc3014c0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 16 Aug 2014 23:38:05 +0000 Subject: rely on filesystem encoding This avoids compatibility problems as File.expand_path respects the "filesystem" encoding of Ruby. I'm not 100% sure this is correct, as Ruby encoding support still confuses me, but this fixes a problem where I attempted to add UTF-8 filename with non-US-ASCII characters in it on ruby-trunk. --- lib/dtas/unix_client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/dtas') diff --git a/lib/dtas/unix_client.rb b/lib/dtas/unix_client.rb index d2ae7b8..40dedcc 100644 --- a/lib/dtas/unix_client.rb +++ b/lib/dtas/unix_client.rb @@ -13,7 +13,7 @@ class DTAS::UNIXClient # :nodoc: include DTAS::XS def self.default_path - (ENV["DTAS_PLAYER_SOCK"] || File.expand_path("~/.dtas/player.sock")).b + (ENV["DTAS_PLAYER_SOCK"] || File.expand_path("~/.dtas/player.sock")) end def initialize(path = self.class.default_path) -- cgit v1.2.3-24-ge0c7