Skip to content

Commit

Permalink
• Fix handling of script's with hashbangs.
Browse files Browse the repository at this point in the history
If the script contains a hashbang, we use that to form the basis of the command to launch the script (but still append any additional args). To do this, we run Shellwords over the hashbang instead of calling `executable`. The python and ruby scriptmates have been updated to be compatible with this change.


git-svn-id: http://svn.textmate.org/trunk/Bundles/Ruby.tmbundle@9642 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information
ldaley committed May 21, 2008
1 parent 1aaa62a commit c39d2c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Support/RubyMate/run_script.rb
Expand Up @@ -5,7 +5,7 @@

class RubyScript < UserScript
def lang; "Ruby" end
def executable; @hashbang || ENV['TM_RUBY'] || 'ruby' end
def executable; ENV['TM_RUBY'] || 'ruby' end
def args; ['-rcatch_exception', '-rstdin_dialog'] end
def version_string
ruby_path = %x{ #{executable} -e 'require "rbconfig"; print Config::CONFIG["bindir"] + "/" + Config::CONFIG["ruby_install_name"]'}
Expand Down

0 comments on commit c39d2c8

Please sign in to comment.