[SOLVED] log4r 1.1.4 & ruby 1.9.1 => GDC.rb and NDC.rb syntax error, unexpected ‘:’, expecting keyword_then or ‘;’ or ‘n’

EDIT: SOLVED , vedere commento 😀

log4r 1.1.4 & ruby 1.9.1 => GDC.rb and NDC.rb syntax error, unexpected ‘:’, expecting keyword_then or ‘;’ or ‘n’

GDC.rb

--- GDC.rb	Thu Jan 28 17:03:12 2010

+++ GDC.rb.new	Thu Jan 28 16:50:37 2010

@@ -13,10 +13,10 @@

     private_class_method :new

 

     def self.check_thread_instance()

-      if ( Thread.main != Thread.current ):

+      if ( Thread.main != Thread.current )

 	raise "Can only initialize Global Diagnostic Context from Thread.main" 

       else

-	if ( Thread.main[GDCNAME] == nil ):

+	if ( Thread.main[GDCNAME] == nil )

 	  Thread.main[GDCNAME] = $0

 	end

       end

line 19
repalce
if ( Thread.main[GDCNAME] == nil ):
with
if ( Thread.main[GDCNAME] == nil )

NDC.rb

--- NDC.rb	Thu Jan 28 17:03:09 2010

+++ NDC.rb.new	Thu Jan 28 16:51:35 2010

@@ -15,7 +15,7 @@

     private_class_method :new

 

     def self.check_thread_instance()

-      if ( Thread.current[NDCNAME] == nil ):

+      if ( Thread.current[NDCNAME] == nil )

 	Thread.current[NDCNAME] = Array.new

 	Thread.current[NDCNAMEMAXDEPTH] = NDCDEFAULTMAXDEPTH

       end

@@ -65,7 +65,7 @@

 

     def self.push( value )

       self.check_thread_instance()

-      if ( Thread.current[NDCNAME].length < Thread.current[NDCNAMEMAXDEPTH] ):		

+      if ( Thread.current[NDCNAME].length < Thread.current[NDCNAMEMAXDEPTH] )

 	Thread.current[NDCNAME].push( value )

       end

     end