Permalink
Browse files

Reset @mask_before_reopen in Syslog.mask=

Without this, calling Syslog.open after Syslog.mask= will erroneously
reset the mask to the value stored in @mask_before_reopen
  • Loading branch information...
1 parent c927f33 commit b9f7d0e843f9993d00ba480cc3441a1ee2e550ed Lewis Marshall committed Sep 13, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/syslog.rb.ffi
View
@@ -128,6 +128,8 @@ module Syslog
raise RuntimeError, "must open syslog before setting log mask"
end
+ @mask_before_reopen = nil
+
@mask = Rubinius::Type.coerce_to mask, Fixnum, :to_int
Foreign.set_mask(@mask)

0 comments on commit b9f7d0e

Please sign in to comment.