Changes in TextMate Support for MacRuby
Hi all- Hopefully I'll keep this up. Here are some changes to get MacRuby to work with the Textmate Ruby support. I'm sing TextMate Version 1.5.7 (1436), and MacRuby version 0.3 (ruby 1.9.0 2008-06-03) [universal-darwin9.4]. There are several places in TextMate.app/Contents/SharedSupport/Support/lib/io.rb that use the old 1.8 "when :" syntax: colon.rb:5: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' when 1: print "one\n" ^ As I'm new to Ruby, I just changed these to "when 1 then..." and so on. Perhaps there's a more elegant way. Also, upgrading the rcodetools in Ruby.tmbundle/support/vendor from the 0.5.0 to 0.8.0 version made some bad stuff go away. The tarball is available at: <http://eigenclass.org/hiki.rb?rcodetools> And finally, if it makes any difference, I'm running MacRuby by setting my TM_RUBY environment variable to "/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/bin/macruby" in the Advanced Preferences. I'll post more as I find and fix... HTH, Charles
Hi Charles, On Aug 18, 2008, at 8:11 AM, Charles Turner wrote:
Hi all-
Hopefully I'll keep this up. Here are some changes to get MacRuby to work with the Textmate Ruby support. I'm sing TextMate Version 1.5.7 (1436), and MacRuby version 0.3 (ruby 1.9.0 2008-06-03) [universal-darwin9.4].
There are several places in TextMate.app/Contents/SharedSupport/Support/lib/io.rb that use the old 1.8 "when :" syntax:
colon.rb:5: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' when 1: print "one\n" ^
As I'm new to Ruby, I just changed these to "when 1 then..." and so on. Perhaps there's a more elegant way.
Also, upgrading the rcodetools in Ruby.tmbundle/support/vendor from the 0.5.0 to 0.8.0 version made some bad stuff go away. The tarball is available at:
<http://eigenclass.org/hiki.rb?rcodetools>
And finally, if it makes any difference, I'm running MacRuby by setting my TM_RUBY environment variable to "/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/bin/macruby" in the Advanced Preferences.
I'll post more as I find and fix...
This is great! I do not use textmate personally but I'm sure there are a few guys around willing to test your bundle :) Also, I don't really know where the textmate bundles are hosted, but if you want your bundle to be integrated as part of the MacRuby source tree, and maintained there, we can do it. Laurent
On Tue, 19 Aug 2008 12:33:07 -0700, Laurent Sansonetti wrote:
This is great! I do not use textmate personally but I'm sure there are a few guys around willing to test your bundle :)
Also, I don't really know where the textmate bundles are hosted, but if you want your bundle to be integrated as part of the MacRuby source tree, and maintained there, we can do it.
Hi Laurent- I hooked up with the developer's list for TextMate, and have offered up a bunch of changes for the editor to work with Ruby 1.9 (and, I presume, MacRuby). I think I've addressed all the obvious "bad" spots, and haven't run into other trouble while using TextMate for Ruby programming. Many/most of them have been committed to the TextMate bundle SVN, and so can be gotten there. Anything pending is pretty well documented on the TextMate developers list. Take care! Charles
participants (2)
-
Charles Turner
-
Laurent Sansonetti