Skip to content

Instantly share code, notes, and snippets.

@adam12
Created March 10, 2020 03:20
Show Gist options
  • Save adam12/0343323253f3e7aeb5b3e21472ef17bf to your computer and use it in GitHub Desktop.
Save adam12/0343323253f3e7aeb5b3e21472ef17bf to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require "rbconfig"
RUBY = File.join(RbConfig::CONFIG["bindir"], RbConfig::CONFIG["RUBY_INSTALL_NAME"])
exec RUBY, "-e", "eval File.read('#{__FILE__}')[/^__END__(.*)/m, 1]"
__END__
puts "Hello world!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment