@@ -73,26 +73,26 @@ class << self
7373 def self . remove_log_handler
7474 if @glib_log_handler_id != 0 && @glib_log_domain
7575 g_log_remove_handler @glib_log_domain , @glib_log_handler_id
76- @glib_log_handler_id = nil
76+ @glib_log_handler_id = nil
7777 end
7878 end
7979
8080 def self . set_log_domain domain
8181 GLib ::remove_log_handler
8282
83- @glib_log_domain = domain
83+ @glib_log_domain = domain
8484
8585 # forward all glib logging output from this domain to a Ruby logger
86- if @glib_log_domain
87- # disable this feature for now
88- #
89- # libvips background worker threads can issue warnings, and
90- # since the main thread is blocked waiting for libvips to come back
91- # from an ffi call, you get a deadlock on the GIL
92- #
93- # to fix this, we need a way for g_log() calls from libvips workers
94- # to be returned via the main thread
95- #
86+ if @glib_log_domain
87+ # disable this feature for now
88+ #
89+ # libvips background worker threads can issue warnings, and
90+ # since the main thread is blocked waiting for libvips to come back
91+ # from an ffi call, you get a deadlock on the GIL
92+ #
93+ # to fix this, we need a way for g_log() calls from libvips workers
94+ # to be returned via the main thread
95+ #
9696
9797# @glib_log_handler_id = g_log_set_handler @glib_log_domain,
9898# LOG_LEVEL_DEBUG |
@@ -104,13 +104,13 @@ def self.set_log_domain domain
104104# LOG_FLAG_FATAL | LOG_FLAG_RECURSION,
105105# LOG_HANDLER, nil
106106
107- # we must remove any handlers on exit, since libvips may log stuff
108- # on shutdown and we don't want LOG_HANDLER to be invoked
109- # after Ruby has gone
110- at_exit {
111- GLib ::remove_log_handler
112- }
113- end
107+ # we must remove any handlers on exit, since libvips may log stuff
108+ # on shutdown and we don't want LOG_HANDLER to be invoked
109+ # after Ruby has gone
110+ at_exit {
111+ GLib ::remove_log_handler
112+ }
113+ end
114114
115115 end
116116
@@ -487,7 +487,7 @@ def initialize msg = nil
487487 @details = msg
488488 elsif Vips ::vips_error_buffer != ""
489489 @details = Vips ::vips_error_buffer
490- Vips ::vips_error_clear
490+ Vips ::vips_error_clear
491491 else
492492 @details = nil
493493 end
@@ -575,9 +575,9 @@ def self.set_debug debug
575575 # True if this is at least libvips x.y
576576 def self . at_least_libvips? ( x , y )
577577 major = version ( 0 )
578- minor = version ( 1 )
578+ minor = version ( 1 )
579579
580- major > x || ( major == x && minor >= y )
580+ major > x || ( major == x && minor >= y )
581581 end
582582
583583 LIBRARY_VERSION = Vips ::version_string
0 commit comments