[SVN] executor.rb: Changes for Ruby 1.9

Charles Turner vze26m98 at optonline.net
Thu Aug 28 18:13:32 UTC 2008


This diff file shows the patches I made to get the support file 
executor.rb to work 
with ruby 1.9.0 (2007-12-25 revision 14709) [i686-darwin9.4.0]

While this fixed the symptom, I have a low confidence that it fixed the 
actual cause of the problem.

I made no attempt to write code that works for another Ruby version. 
Zip of the diff attached below.

-Charles

--- /Library/Application Support/TextMate/Support/lib/tm/executor.rb
+++ executor.rb
@@ -42,6 +42,9 @@
 require SUPPORT_LIB + 'escape'
 require SUPPORT_LIB + 'io'
 
+$KCODE = 'u'
+require 'jcode'
+
 $stdout.sync = true
 
 module TextMate
@@ -81,7 +84,7 @@
 
           callback = proc do |str, type|
             str.gsub!(ENV["TM_FILEPATH"], "untitled") if 
ENV["TM_FILE_IS_UNTITLED"]
-            filtered_str = block.call(str,type) if block.nil? == false 
&& [:err, :out].include?(type)
+            filtered_str = block.call(str,type) if [:err, 
:out].include? type
             if [:err, :out].include?(type) and not filtered_str.nil?
               io << filtered_str
             else


-------------- next part --------------
A non-text attachment was scrubbed...
Name: executor-1.9.diff.zip
Type: application/zip
Size: 951 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate-dev/attachments/20080828/43a1888b/attachment.zip>


More information about the textmate-dev mailing list