Skip to content

Instantly share code, notes, and snippets.

@yhara
Created October 16, 2014 10:18
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 yhara/cac0a202802f67dcbc58 to your computer and use it in GitHub Desktop.
Save yhara/cac0a202802f67dcbc58 to your computer and use it in GitHub Desktop.
Never mind the annoying typo (eg. $ rub y-e 'p 1' just works as you want)
#!/usr/bin/env ruby
s = ARGV.join(' ')
if s[0] != "y"
puts "usage: rub y-v"
else
exec "ruby #{s.sub(/^./, '')}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment