R
RichardOnRails
Hi,
I have the 11-line script below. Ruby 1.9.3 barfs on line 8 with the
error msg in the comment on that line.
Script
=====
print "Search what: D = Docs; C = Current
what = gets.chomp
wk_dir = case what
when /^[Dd]/
Dir.chdir ".."
Dir.pwd
when /^[Cc]/
"K:\\___Current" # syntax error, unexpected tCONSTANT, expecting
$end
else
puts "Invalid choice \"%s\"" % what && exit
end
I have the 11-line script below. Ruby 1.9.3 barfs on line 8 with the
error msg in the comment on that line.
Script
=====
print "Search what: D = Docs; C = Current
what = gets.chomp
wk_dir = case what
when /^[Dd]/
Dir.chdir ".."
Dir.pwd
when /^[Cc]/
"K:\\___Current" # syntax error, unexpected tCONSTANT, expecting
$end
else
puts "Invalid choice \"%s\"" % what && exit
end