Skip to content

Commit

Permalink
Fix: Socksify::Debug = false enables debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
musybite committed Mar 13, 2018
1 parent d13fd2b commit b200931
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ChangeLog
Expand Up @@ -66,3 +66,10 @@ SOCKSify Ruby 1.7.1
* Send requests in one call
For compatibility with shadowsocks <=3.0.3
(thanks to Yilin Chen)

unreleased
SOCKSify Ruby 1.7.2
===================
* Fix Socksify::debug = false
Previously, debug was enabled if any value was assigned to Socksify::debug
(thanks to Dennis Blommesteijn)
2 changes: 1 addition & 1 deletion lib/socksify/debug.rb
Expand Up @@ -44,7 +44,7 @@ def self.debug_error(str)
private

def self.debug(color, str)
if defined? @@debug
if defined?(@@debug) && @@debug
puts "#{color}#{now_s}#{Color::Reset} #{str}"
end
end
Expand Down

0 comments on commit b200931

Please sign in to comment.