【发布时间】:2015-12-11 21:33:25
【问题描述】:
好的,我已尽我所能让这段代码运行而不会出现错误,但无济于事。希望你能帮帮我。
require 'launchy'
#def linebreak(breakline)
def program()
puts "Welcome to test program v1. Would you like to continue? ENTER y for Yes or n for no"
user_input_1 = gets.chomp
if user_input_1 == "y"
puts "How would you like to proceed CRASH | TEXTMAKER | UNDECIDED // CASE SENSITIVE"
user_input_2 = gets.chomp
if user_input_2 == "CRASH"
while true Launchy.open("http://google.com")
elsif user_input_2 = "TEXTMAKER"
while true out_file.puts("test program v1")
else
puts "You have not entered a method."
elsif user_input_1 == "n"
abort
else
puts "That is not a valid command. Please run the script again."
end
end
【问题讨论】:
-
请不要让我们猜测。编辑您的问题以包含您收到的实际错误消息,包括行号和回溯。
标签: ruby rubygems syntax-error