diff --git a/Rakefile b/Rakefile index f63062e..9fef4df 100644 --- a/Rakefile +++ b/Rakefile @@ -4,7 +4,8 @@ end def ruby require 'rbconfig' - File.join([Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']]) << Config::CONFIG['EXEEXT'] + conf = Object.const_get(defined?(RbConfig) ? :RbConfig : :Config)::CONFIG + File.join([conf['bindir'], conf['ruby_install_name']]) << conf['EXEEXT'] end # -------------------------------------------------- diff --git a/lib/watchr.rb b/lib/watchr.rb index 3d0b4f4..2c7a993 100644 --- a/lib/watchr.rb +++ b/lib/watchr.rb @@ -107,8 +107,9 @@ def debug(msg) # handler class for current architecture # def handler + conf = Object.const_get(defined?(RbConfig) ? :RbConfig : :Config)::CONFIG @handler ||= - case ENV['HANDLER'] || Config::CONFIG['host_os'] + case ENV['HANDLER'] || conf['host_os'] when /darwin|mach|osx|fsevents?/i if Watchr::HAVE_FSE Watchr::EventHandler::Darwin