Q:

how to run a ruby script to decompress a file?

I need help with a ruby code. I've found an Italian dictionary compressed using a ruby script. As I have no experience with Ruby, I am trying to use the script provided to decompress the file I found here: https://github.com/mircomacrelli/italian-dictionary. 
I have already tried to download the dictionary from here: https://github.com/mircomacrelli/italian-dictionary
and I've uploaded the dictionary file (italian.dic.fc) to run the script (named dictionary-expand.rb)
using the online compiler: https://repl.it/languages/ruby. The ruby script I am using is below. 
  require 'zlib'
abort 'No input file specified' if ARGV.empty?

Zlib::GzipReader.open(ARGV.first) do |gz|
  File.open(File.basename(ARGV.first, 'italian.dic.fc'), 'w') do |out|
    last = ''
   until gz.eof
      counter = gz.getc.ord
      delta = gz.gets.strip
      last = last[0, counter] + delta
      out.puts last
    end
  end
end

I want to open the dictionary. Not sure if what I'm trying to do is what I have to do.

A:

If you download the whole repo you mentioned, it's enough to run this in its directory:
ruby dictionary-expand.rb italian.dic.fc

No changes to the script required.
If you want to run it in this REPL though, script would look like that:
require 'zlib'
file = 'italian.dic.fc'
Zlib::GzipReader.open(file) do |gz|
  File.open(File.basename(file, '.fc'), 'w') do |out|
    last = ''
    until gz.eof
      counter = gz.getc.ord
      delta = gz.gets.strip
      last = last[0, counter] + delta
      out.puts last
    end
  end
end

