0
ルビー2.0ルビー - 予期しない戻り(LocalJumpError)
はなぜ以下のコードは、予期しない戻り(LocalJumpError)を与えるだろうか?
# some code here
puts "Scanning for xml files .."
zip_files = Dir.entries(directory).select { |f| File.extname(f) == '.zip' }
if(zip_files.count == 0)
puts "No files found, exiting..."
return
end
# more code here (if files found)
Error: unexpected return (LocalJumpError)
No files found, exiting...
[Finished in 0.9s with exit code 1]
'return'を削除してください –