Browse files

Ensure system ruby is used for “RubyMate”

Ruby 2.0 will close non-standard file descriptor when calling Kernel#exec, which means that the file descriptor used for printing the stack trace is unavailable in our child process.

Ruby 1.8.7 does not accept any options to Kernel#exec so it doesn’t seem like we can make the script compatible with both versions of ruby (at least not with simple code).

This should avoid issue #21.

Related thread on mailing list:
  • Loading branch information...
1 parent 659cf6e commit 6b42594bfa54fc259e10165e44ac51293bc4459f @sorbits sorbits committed Mar 9, 2013
Showing with 3 additions and 5 deletions.
  1. +3 −5 Commands/Run.tmCommand
8 Commands/Run.tmCommand
@@ -7,11 +7,9 @@
- <string>#!/bin/sh
-/usr/bin/env ruby -KU -- "$TM_BUNDLE_SUPPORT/RubyMate/run_script.rb"
+ <string>#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -KU
+require "#{ENV['TM_BUNDLE_SUPPORT']}/RubyMate/run_script.rb"

0 comments on commit 6b42594

Please sign in to comment.