[TxMt] [FIX] checknest.rb syntax error

Freek Dijkstra public at macfreek.nl
Fri Dec 23 09:21:24 UTC 2011


After I upgraded to Lion, which has Ruby to 1.9 instead of Ruby 1.8, the
command "Environment Closer – \end{…}" (⌥⌘.) in the LaTeX bundle fails
with the following error:

TextMate.app/Contents/SharedSupport/Support/bin/checknest.rb:44:
syntax error, unexpected ':', expecting '}'
  when /^-l(\d+)$/: levels = $1.to_i

I'm using TextMate 1.5.10 (1631).

Here is diff that fixes this error:

--- checknest.rb	2011-03-15 08:57:48.000000000 +0100
+++ checknest.rb	2011-12-23 10:17:00.000000000 +0100
@@ -40,11 +40,11 @@
 debug = false
 ARGV[3..-1].each {|e|
   case e
-  when /^-n(\d+)$/: num = $1.to_i
-  when /^-l(\d+)$/: levels = $1.to_i
-  when /^-e(.+)$/: error_text = $1
-  when /^-p$/: pass = true
-  when /^-d$/: debug = true
+  when /^-n(\d+)$/ then num = $1.to_i
+  when /^-l(\d+)$/ then levels = $1.to_i
+  when /^-e(.+)$/ then error_text = $1
+  when /^-p$/ then pass = true
+  when /^-d$/ then debug = true
   end
 }

Regards,
Freek Dijkstra


More information about the textmate mailing list