Skip to content

Instantly share code, notes, and snippets.

@also
Created August 9, 2010 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save also/516228 to your computer and use it in GitHub Desktop.
Save also/516228 to your computer and use it in GitHub Desktop.
One file. Valid Ruby, Python, and shell script.
#!/usr/bin/env sh # ruby wants to see its name in the shebang
# valid python, ruby and bash
ignore=""" "
ignore=\
=begin
unset ignore
echo only bash sees this
python $0
ruby $0
exit
#"""
# python only
del ignore
print 'only python sees this'
"""
=end
puts 'only ruby sees this'
#"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment