From af12d387069d017494daa23534fa7f87aea9ff3b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 3 Sep 2009 19:23:43 -0700 Subject: CLOGGER_PURE forces the pure version to be loaded This is useful for testing the pure Ruby version in case clogger_ext is already installed on your system. --- GNUmakefile | 2 +- lib/clogger.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index a9bf2d8..b57c947 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -25,7 +25,7 @@ test-ext: ext/clogger_ext/clogger.$(DLEXT) $(ruby) -Iext/clogger_ext:lib test/test_clogger.rb test-pure: - $(ruby) -Ilib test/test_clogger.rb + CLOGGER_PURE=t $(ruby) -Ilib test/test_clogger.rb test: test-ext test-pure diff --git a/lib/clogger.rb b/lib/clogger.rb index 7665992..fbcd220 100644 --- a/lib/clogger.rb +++ b/lib/clogger.rb @@ -131,6 +131,7 @@ end require 'clogger/format' begin + raise LoadError if ENV['CLOGGER_PURE'] require 'clogger_ext' rescue LoadError require 'clogger/pure' -- cgit v1.2.3-24-ge0c7