Want more features on Pastebin? Sign Up, it's FREE!

Ruby Error

By: a guest on Jan 31st, 2014  |  syntax: Ruby  |  size: 0.39 KB  |  views: 51  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print  |  QR code  |  clone
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #This is a piece of code that belongs to a program under development
  2. print "Extension: "
  3. ext = gets.chomp
  5. puts Dir.glob ['*.#{ext}'] #This part is missing something
  6. =begin
  7. Although the program knows it's value it won't do what it's supposed to.
  8. It's suppose to display files of given extension on current directory.
  9. txt for text files
  10. =end
  11. else puts "Unknown command: #{command}"
  12. end
clone this paste RAW Paste Data