Skip to content

Instantly share code, notes, and snippets.

@dtinth
Created July 28, 2012 05:31
Show Gist options
  • Save dtinth/3191927 to your computer and use it in GitHub Desktop.
Save dtinth/3191927 to your computer and use it in GitHub Desktop.
Running Ruby
print("Enter your name: ")
puts("Hello, " + gets())
gem install therubyracer
require 'v8'
class InputOutput
def gets()
proc do
STDIN.gets.chomp
end
end
def puts(str)
STDOUT.puts str
end
def print(str)
STDOUT.print str
end
end
InputOutput.new.eval_js File.read('code.js')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment