Last active
January 29, 2016 08:43
-
-
Save npocmaka/2c0ee4d2a0b763940f61 to your computer and use it in GitHub Desktop.
Ruby Batch polyglot script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@break #^ | |
=begin | |
:: the first line will define break as ruby instance variable and will end it with a comment | |
:: the second line will start ruby multiline comment | |
:: Batch will execute @break [@rem also can be used] command silently wich will do nothing no matter of passed arguments | |
:: the carret [^] at the end will escape the EOF character and batch will take the first two lines as one | |
:: http://dostips.com/forum/viewtopic.php?f=3&t=6931&p=45080#p45080 | |
@echo off | |
echo batch part | |
ruby "%~f0" %* | |
exit /b 0 | |
=end | |
puts 'ruby part' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment